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.
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.
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.
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.
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.
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?
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.
It says error, Object Required.
I got it to work..
thanks for your help
heres the code.
DoCmd.RunCommand acCmdImportAttachText