Get a field ID (1 Viewer)

Iemhoff

New member
Local time
Today, 04:26
Joined
Apr 3, 2025
Messages
1
docmd.transferspreadsheet acImport (access2002)




When i used this, i get my 'table' but without the field 'ID' (autom) this all in vba.

When i do it manual with Import, from either file.xls , file.csv or file.html ist work fine.
I get all data with a field ID.

The question, how insert a ID field in a file, read from file.??? with vba in access2002
 
Works for me?
The first time I imported, it created the table, so no autonumber.
I added an autonumber field and second import populated it?

488 records in the first sheet.
1743674541533.png
 
The ONLY way you can update an autonumber field is by using an append query. So, instead of importing using transferspradsheet, link the table and then run an append query.
 

Users who are viewing this thread

Back
Top Bottom