randomize

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello folks,

what is the best and safest way to have access create a field with random
numerical values (6 digits) for this specific field created on a table or a
query. the value on this field can not be duplicated.


Please help.

Regards,
 
To ensure that values are not duplicated, use a unique index
on the field.

To generate random values, set the default value to something
like this:

=Rnd(-Time())*1000000
or
=Int(CDbl(Now())*1000000)

(david)
 
Thanks David,

your suggestion works great.. it is randomizing the values on the fields
exactly the way i want it.
 
Back
Top