Adam,
To be more specific on Wai's suggestion, see the article and code on Craig Berntson's website.
http://members.home.net/foxpro/kb/kb0006.html>I am new to FoxPro, and I am having trouble with a certain command. I need to be able to establish a new record number, automatically generated when adding a new entry into the form. I cannot quite grasp the code for it. Would anyone be able to help with this??