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

serializing in Approach 1

Status
Not open for further replies.
Nov 14, 2000
2
US
In a database that was created without serial numbers, how do I now serialize the records?
 
Create the field for the serial number to be put into. Now you need to use two macros to number the records and a variable field for the starting number. Then set the next highest number in Field Definition.

1) Define a variable field VarNum, put it on a view and enter your starting number for the serialization.

2) Write two macros:
Serial1
. VIEW Switch to a worksheet view of the database
. FIND All
. RECORDS First
. RUN Serial2

Serial2
. SET yourserialfield = VarNum
. SET VarNum = VarNum + 1
. ENTER
. RECORDS Next
. RUN Serial2

3) Sort the worksheet high-to-low on the serial field and get the highest number assigned. Go to Create - Field Definition and for that serial field, set the next number in the default serial options to the highest assigned number plus 1.

That will do it! Sue Sloan, XpertSS.com
 
I am still confused about the SET part of the Serial2. This is what I did, and it doesn't work. What is wrong?
your suggestion: SET yourserialfield = VarNum
SET VarNum = VarNum + 1
my macro: SET Player# = 100001
SET Player# = 100001 = 100001 + 1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top