You can use AutoInc fields in VFP 8 and above. Otherwise, try
http://www.craigberntson.com/Articles/kb006.htm>What is the best method for creating a unique id for a record when multiole users are creating records at the same time?
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer