How can I automatically add an Autonumber field to a table in Access 2007?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Paldrion
    New Member
    • Apr 2008
    • 3

    How can I automatically add an Autonumber field to a table in Access 2007?

    I will need it to be in VBA, since I need to put it in an Access 2007 database and execute it with an Access macro.

    What I am doing is using a utility to find the hard drives' conditions on computers and list them in a text file sequentially. The utility does not list numbers or drive letters. So I need to put some kind of identifying information on the entries so I can put them in the appropriate spot in the Access Database record.

    I need the number to come out as such:
    First record found | 1
    Second record found | 2
    and so forth.

    Thanks for your help.
  • Paldrion
    New Member
    • Apr 2008
    • 3

    #2
    I figured it out. Instead of appending the imports to an existing table, I can Import them as new tables, let Access add a primary key, and then automate the imports.

    Thanks anyway.

    Comment

    Working...