Hi,
Other alternatives.
Generate all the values in a table. Take one record, at random, Delete it
(or flag a field at that effect), after having put it in another table.
Continue to take another one (among those not flagged, if you use a flag),
as required.
Moving, deleting, or even creating tons of new records is relatively slow.
So...
if you use a "flag", assuming the flag is a LONG, nullable field, you can
start with all records with a NULL under it.
MyRandom, Flag ' fields name
The goal is to use the primary key value of the associated record (from
another table) under the column Flag to indicate that the random value is
'taken'. Doing so, you don't delete anything, and you don't have to check
for duplicated value among all other fields (which is easy if you have an
index), but just have to check Flag IS NULL.
Hoping it may help,
Vanderghast, Access MVP