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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Import selected fields

Status
Not open for further replies.

LiLgUrL

Technical User
Feb 9, 2003
59
CA
i want to import an excel file...

DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel8, "Transaction", "\Transaction\" & cmbTrans.Value, -1, "A1:C1"

but then the field names of my excel file and field names in my table are not exactly the same at a certain field they are not and i should not change it.
i receive some errors with that - i can not import... is there a possible way?
like should add here -+cmbTrans.Value, -1, "A1:C1"+- i want to select A to C , E to F leaving the values of column D. Considering that i can import even they have different field names. Or is there a way to rename the field names upon importing?

Thanks in advance i just can't figure out the solution.
 
Have you tried to import the sheet in a temporary table and then play with this table before an append query to the final table ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top