Still having problems with importing

  • Thread starter jln via AccessMonster.com
  • Start date
J

jln via AccessMonster.com

OK here is the probelm im having.

I need to beable to import about 20-30 excel workbooks that are place in the
same folder each month, So the folder name can be hard coded. The imports
will all be placed into one table. I need to beable to do this with out
linking the workbooks and doing an append. If i could select each file and
then loop though the import with out over writing the data thats in the table
that would work great. Im weak on this so i could use some help.
 
S

Stefan Hoffmann

hi,

jln via AccessMonster.com write:
I need to beable to import about 20-30 excel workbooks that are place in the
same folder each month, So the folder name can be hard coded. The imports
will all be placed into one table. I need to beable to do this with out
linking the workbooks and doing an append. If i could select each file and
then loop though the import with out over writing the data thats in the table
that would work great. Im weak on this so i could use some help.
Use the Dir() function to loop over all files.

Use

SELECT *
FROM [Excel 8.0;Database=yourExcelfile;Hdr=Yes|No].[SheetName$]

in as recordsource for a query. Use CurrentDb.QueryDefs("yourQuery").SQL
to modify that statment.

Use an appropriate append query with DoCmd.OpenQuery.


mfG
--> stefan <--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top