Although the autoincrement field would work fine in most cases, it can cause problems with linked data - especially in data recovery situations. I use a seperate table that contains the next number in a series. I grab it using a tCursor, write it to the new record, then increment it so it's ready for the next record.
Mac
"Do not delve too deeply in the arts of your enemy and so become ensnared by them"
IF this is a one-shot, meaning you won't have to run it again, *and* no one else will be using the table while you're assigning the numbers, then something like this should work:
Now, that is very quick and dirty; it contains no error-checking and assumes a great deal. (Don't forget to replace "tablename" with the name of your table and "FiledNAme" withg the name of the field. Yes, both values need to be in quotes.)
IF, however, you're looking for something to maintain your record number while multiple users are entering data, then you're want to use MAc's approach *or* take a look at RDA's AutoKey product (see
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.