I would like to create and capture a Random Number generator using VBA. This process will be used across the board anytime there's a new record added to any database.
1. Create the random number: 6 digits. Capture that number in a global variable and return it.
2. Open up the PrimaryKey.mdb
3. If the random number exists in the primary key.mdb
THEN close the primarykey.mdb, Rerun the random number generator and recheck against the PrimaryKey.mdb
ELSE insert the record with the primary key generated only, save, update and close primarykey.mdb
Any thoughts? Suggestion on how to accmoplish this task?
.
Thanks in Advance.
J. Turner