Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Random AutoNumber

Status
Not open for further replies.

randaj

MIS
Jan 7, 2003
34
US
With AutoNumber set to Random is there any way to limit the range of numbers Access pulls from and also can you add prefixes?

Example:

Currently -2031668925
Ideally - R123654
 
Hi

If your prefix is always 'R', just add it when you display the number you can do this with concatinate or format so

= "R" & MyAutonumber
= "R" & FORMAT(MyAutonumber,"0000000000")

If the prefix is variable, save the prefix in a seperate column in the table, and again present the output as one number using concatination as described above.

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top