Results 1 to 8 of 8
  1. #1
    mike02 is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2012
    Posts
    245

    Import form

    Hey,



    Is there away to run the same import precedure as you cn in the ribbon but instead on a form? Ie you click a button which then opens the import wizard?
    Also, can you do it so it automatically sets up append to a specific table?


    Thanks.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    No, the import wizard imports objects - not records unless the object is a table then its records will come with it.

    It is possible to run a procedure that will execute sql INSERT SELECT action to append records from another db.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    mike02 is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2012
    Posts
    245
    thats what i need. I have a information questionaire in excel which i send to clients. they fill it out, and them im able to export the data from that excel file into CSV files on my desk top which are my tables in my database with the exact same fields. I want to do that so then i can just click on my menu form to import new data, then from there click the table name... this would bring up the import wizard. with append selected, and the table button i click on selected. that way i only have to select the file location and then procede through the rest of the wizard.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Sorry, I read original post to mean importing from another db. If you want to use import wizard to import from Excel or CSV then yes, the import wizard can append records to existing table.

    However, far as I know, the wizard cannot import data from Excel to CSV file, unless it can import to a linked CSV.

    You are using CSV files as data sources? Why?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    mike02 is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2012
    Posts
    245
    Im not worried about it changing excel files to CSV files as my macro in my excel file does that for me. The reason is i have the tables set up in my excel file to match the tables in my DB. now i have those tables hidden and locked so they cant be veiwed, and it is linked to the questionaire. I run my macro and it splits the worksheets into seperate CSV files to correspodng with the tables. Works great, data imports good all is good. But what im wonder on how to do is i want to have my entire DB operating by forms and reports, and nothing else is visible or able to open. so is there a command that starts the import wizard i can attach to a button, that way i can remove the ribbon from view?

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Try: DoCommand.RunCommand acCmdImport
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    mike02 is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2012
    Posts
    245
    It says error, Object Required.

  8. #8
    mike02 is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2012
    Posts
    245
    I got it to work..
    thanks for your help

    heres the code.
    DoCmd.RunCommand acCmdImportAttachText

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

Similar Threads

  1. Replies: 22
    Last Post: 09-06-2011, 11:34 AM
  2. Acces 2003: Import Form
    By compooper in forum Import/Export Data
    Replies: 4
    Last Post: 06-22-2011, 02:51 PM
  3. import excel into form with combobox fields
    By MyWebdots in forum Import/Export Data
    Replies: 2
    Last Post: 08-09-2010, 02:35 AM
  4. Import value from one form to another
    By vCallNSPF in forum Forms
    Replies: 1
    Last Post: 01-13-2010, 05:49 PM
  5. import custom form data from Outlook
    By bigsteve520 in forum Import/Export Data
    Replies: 0
    Last Post: 11-13-2009, 12:18 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