SQL Statement to generate a random "confirmation number"

gold007eye

Registered User.
Local time
Today, 03:21
Joined
May 11, 2005
Messages
260
I need to have a field on my form so that when a person saves the record a confirmation number is generated. Example: "0000-00-000" I need it to be a random number though not incrimental. Is there some code I can use on an Event procedure that will accomplish this?
 
= Format(Rnd() * 1000000000, "0000-00-000") should do this but there is no check for uniqueness.

If you are not actualy intrested in format then you just need to use a Autonumber and set its "new Values" property to Random

HTH

Peter
 

Users who are viewing this thread

Back
Top Bottom