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

Excel Import issue

Status
Not open for further replies.

Ali29J

Technical User
May 13, 2004
203
GB
Hi All

I have a problem with importing an excel sheet into an access table.

Problem i have is, it wont import because key violation errors, it notes "Null value in an auto-number field"

So whether i enter number in this field in the excel sheet or not it still shows the error...

Is there any way of importing and autonumber field populates automatically?

THanks

Ali
 
You can create a query that does not include the Autonumber field and use TransferSpreadsheet to import to that. For example:

[tt]DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "qryTT", "C:\Docs\Tek-Tips.xls"[/TT]
 
Hi,
You can try the following:
1. In Access, choose File/Import.
2. Navigate to your Excel file.
3. In the Files of Type drop-down, select All Files.
4. Double click the Excel file you want to import.
5. In the Wizard, select the field that is causing the error message and click the "Skip Column" option.
It may let you import it without the offending column.

HTH,


Best,
Blue Horizon [2thumbsup]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top