Mohammad Mobin said:
How can i generate about 60,000 unique IDs of 8 digits or 16 digits?
(alphanumeric characters)
Lookup the rnd function in VBA help. Don't forget to run the
Randomizer function first.
I was going to suggest multiplying the number by 100,000,000 to get
your eight digits however the Rnd function returns a Single which
doesn't have enough digits.
"Single (single-precision floating-point) variables are stored as IEEE
32-bit (4-byte) floating-point numbers, ranging in value from
-3.402823E38 to -1.401298E-45 for negative values and from
1.401298E-45 to 3.402823E38 for positive values."
Ah, and now I notice the requirement for alphanumeric. Presumably 0-9
and A-Z. What about lowercase?
Anyhow I don't know the answer so ignore everything I've typed.
<smile>
Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog -
http://msmvps.com/blogs/access/