+ Reply to Thread
Results 1 to 3 of 3

Need to import excel file to ms access table

  1. #1
    Registered User
    Join Date
    08-30-2020
    Location
    Chennai
    MS-Off Ver
    Office 2016
    Posts
    3

    Need to import excel file to ms access table

    I'm trying to import .xlsx file to the table "Original_Tapesheet" but while running I'm getting Runtime error 2391 saying field not available in the destination table.

    Please Login or Register  to view this content.
    Please help to fix this error
    Last edited by alansidman; 10-08-2020 at 09:15 PM.

  2. #2
    Valued Forum Contributor vba_php's Avatar
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    1,230

    Re: Need to import excel file to ms access table

    are you running this code in access or excel? this is an access question I think, and you posted in an excel forum. your 3rd argument is the target table name. the error makes perfect sense, as what it is saying is that there isn't any congruency or consistency between the 2 tables, whether that be number of fields between the 2, the data types matches between the 2, or possibly something else. are you sure you've covered all that? it's also possible, although low probably that the XML type you specified is not what you should be telling the VBE to import.

    https://docs.microsoft.com/en-us/off...ferspreadsheet

    https://docs.microsoft.com/en-us/off...preadsheettype
    -Adam (please don't call me "sir"!)

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs
    MS-Off Ver
    MS Office 2019
    Posts
    18,496

    Re: Need to import excel file to ms access table

    Code Tags Added
    Your post does not comply with Rule 2 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html



    (I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Import Text File to Access Table using Excel VBA
    By balajismith1992 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-28-2015, 09:34 PM
  2. Use an Excel Macro in Access VBA - Import text file in Access Table
    By joogibabu in forum Access Tables & Databases
    Replies: 3
    Last Post: 10-08-2014, 10:04 AM
  3. Import Excel Table into MS Access
    By Dominicus in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-27-2013, 08:40 AM
  4. Import Text File to Access Table using Excel VBA
    By curiosity1990 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-07-2013, 09:43 AM
  5. Import Excel table referenced in a link stored in an Access table
    By Dionysos in forum Access Tables & Databases
    Replies: 0
    Last Post: 01-16-2013, 08:09 PM
  6. import data from access table to excel pivot table - Enable Auto Refresh
    By okl in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 02-01-2010, 09:38 AM
  7. [SOLVED] import excel to access table
    By SITCFanTN in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-28-2006, 10:35 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1