Results 1 to 5 of 5
  1. #1
    mojtaba79 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jun 2011
    Posts
    3

    import from excel to one table

    hi


    I need to import from a excel automatically and i do have a database but unfortunately it makes a new table for every import.

    i need to make this changes to this database.

    1. import all to one table.
    2. if possible, skip first line off excel for importing.
    3. if possible, import every field name to same field name in table

    i appreciate every help.
    thanks

  2. #2
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    Well, of course it is using a new name for the table instead of the same table. You are using this:

    mTable = "IMPORT " & mSheetName & " " & Format(Date, "m-d-yy")

    and then using mTable as the name of the Table to import to from the DoCmd.TransferSpreadsheet code. If you want it to go to the same table, use the same table name instead of the name based on the sheet and date.

  3. #3
    mojtaba79 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jun 2011
    Posts
    3
    thanks for reply.

    actually i did this already but problem is that it not update the table.
    it removed all the previous record and it not my wish.

    i want my previous record be there for me
    thanks for your help

  4. #4
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    Then import to a transitional table so it can overwrite it and then use an append query to append the records to the actual table you want.

  5. #5
    mojtaba79 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jun 2011
    Posts
    3
    let me explain more.

    i want this feature in the databases that newbie user will use it and i want to be all in forms.

    every day new excel file with same structure will have to be import in to the database.

    i need to be in a table so that i can make a queries and report and so on..

    so

    I want A table(master table) that every day new record update it and the previous record stay intact

    for making append query i have to place it in form and i thinks it is difficult way then just make small changes in this code

    thanks a million

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Import from Excel
    By Jonathan58 in forum Import/Export Data
    Replies: 18
    Last Post: 07-19-2013, 09:52 AM
  2. Upload (import) Excel Table Info
    By AKQTS in forum Access
    Replies: 2
    Last Post: 04-21-2011, 02:07 PM
  3. Disabling Excel import to a specific table
    By JoshD in forum Import/Export Data
    Replies: 0
    Last Post: 04-15-2011, 02:26 PM
  4. Replies: 1
    Last Post: 11-21-2010, 10:26 PM
  5. VBA to open excel, import on close of excel
    By bdaniel in forum Programming
    Replies: 0
    Last Post: 03-20-2010, 02:45 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums