Results 1 to 4 of 4
  1. #1
    tggsun is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2011
    Posts
    11

    Unhappy create a button for import excel file

    Hello all,
    I'm a new one to use Access.
    I have a lot of data files whidch need to be imported into access database. the fields' are identical for excel and access database.
    I need to create a import button to import those excel files.


    I searched on internet and could not find out a course to teach me how to do that. Is there anyone knows that (anything would be fine, such as course, video, book or link ... or your tip)?
    Thank you very much!
    dd sf

  2. #2
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    Will you be importing the data from these Excel files on a regular basis?
    Or will it just be a one-time thing?

  3. #3
    tggsun is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2011
    Posts
    11
    I'll do that on a regular basis. That's why I would like to create a button to do that.
    Thanks,
    dd sf

  4. #4
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    I use Macros to do this on a regular basis.
    What I do is:
    Create a new Macro in design View.
    Make the first Action in the Macro - SetWarnings = No.
    Next Action OpenQuery - to run a Delete query that deletes the previous day's data from the Access table that will be receiving today's data from the spreadsheet.
    Next Action - ImportExportSpreadsheet - to import data from the spreadsheet to the table from which you just deleted the previous day's data.
    Final Action - QuitAccess.

    I have all these actions in a Macro named AutoExec.
    I have a Windows Scheduler Scheduled Task that opens this database early in the morning before I get in to work.

    It has worked really well for me.

    Let me know if you have questions.

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

Similar Threads

  1. Browse for Excel File and Import
    By AKQTS in forum Programming
    Replies: 1
    Last Post: 07-12-2011, 07:33 AM
  2. Excel Import - File with row spaces
    By Jackfam58 in forum Import/Export Data
    Replies: 1
    Last Post: 04-13-2011, 07:35 PM
  3. Import Excel File Using Macro?
    By oregoncrete in forum Import/Export Data
    Replies: 0
    Last Post: 04-05-2011, 12:26 PM
  4. Import Excel file as report template - possible?
    By justinwright in forum Reports
    Replies: 2
    Last Post: 11-01-2010, 07:01 AM
  5. Create a command button to Browes for file
    By sawill in forum Programming
    Replies: 3
    Last Post: 03-15-2009, 05:02 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