View Single Post
  #1  
Old October 25th, 2008, 07:34 PM posted to microsoft.public.access.tablesdbdesign
MackBlale
external usenet poster
 
Posts: 19
Default prevent duplicates in random numbers

I have designed a database to produce a random number beteween 0000 and 9999
as unique client number. I used =Int((1000-1+1)*Rnd()+1) under default value
in properties. I chose yes, no duplicates under Indexed. Everything works
fine, except when a duplicate random number is generated. I need Access to
recognize that and generate a new number and continue. Any suggestions?