Tom formulated on Tuesday :
Well.., it's not uncommon to use a fixed length abbreviation of the
customer name and append numbers to it so as to avoid duplication. I'm
not sure RAND() is the way to go, though. I might use an incremental
methodology similar to what I use for record indexes, where the alpha
part is a fixed length and the number part is a fixed length. In this
case the formula would operate on the number part to increment it for
each additional record added to the table. For example...
"ABCD000001" (1st record)
"ABCE000002" (2nd record)
...and so on
..where the alpha part refs the abbreviated customer name and the
number part assigns it a digital ID. That allows for either customer
abbreviation to repeat as appropriate without causing an ID conflict...
"ABCD000012" is distinctly different than "ABCD000001"
HTH
--
Garry
Free usenet access at
http://www.eternal-september.org
ClassicVB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion