Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Import from EXCEL help

Status
Not open for further replies.

hysaccess

Programmer
May 27, 2003
12
AU
Hello all,

Oh, here's the deal I have information in Microsoft Excel, which I need to process and append to the access database.

So I first import the data from excel to access on a temporary table using:

DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "tblTemp", strRet, False, "Sheet1!A2:N65536"

Having done that now i need to cycle through each record in the temporary table and send it into the production database with those who satisfy my SQL statement ...

I need all this to be done programmatically... HELP
 
Sounds like you just need to create an Append query on your Temp table and add it to where it needs to be.

Create your query and selection criteria then in your code after the spreadsheet transfer run the query by

DoCmd.OpenQuery "queryName"

You would probably wish to also turn off and on the Warnings messages before and after this action.

Hope this helps

Passingby
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top