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

Adding an incremented field

Status
Not open for further replies.

bombplayer

Programmer
Jul 3, 2001
47
0
0
US
I am in the process of writing an insert routine to a history file from a daily file. This history file has an id field which is used to link to other files. How can I increment additions to the history file so that each has a distinct id number (i.e. last record in history file is 10, first record added is 11, second is 12 and so on)?
 
Are you talking about a file or a table? If you want to add an identity field, go into the design view of the table. Place a check on the Identity column for that field and make sure that the Identity seed is the number you want to start with and the increment is set to 1.
 
Sorry it is from a table to a table. The identity is set to one. Tried it out worked like a charm. Think I tried to overthink that one
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top