randomize

E

eposada

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,
 
D

david epsom dot com dot au

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)
 
E

eposada

Thanks David,

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top