[tt]
Hi:
There are two ways I know of:
1) Use the data type autonumber for your "ID" field. It has many advantages for large, multi-user databases.
2) Another way is to use the DMax function. This is advantageous in that the number is not carved in stone. But there are inherent dangers when this is used in large, multi-user databases. Use this method at your own risk, which is, another user may slip in an identical Primary Key (ID?) and you'd be in the soup (to paraphrase my friend Michael).
Select your "ID" control.
Select Properties, then Data, then Default Value.
Enter:
=DMax("[MyIDfieldName]","[tblMyTable]"
+1
This will increment the default value of the highest ID number in your table by 1.
I hope this is helpful. Gus Brunston
![[glasses] [glasses] [glasses]](/data/assets/smilies/glasses.gif)
An old PICKer, using Access2000
Intermediate skills. Back up before taking my suggestions!