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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding a prefix to an autonumber field

Status
Not open for further replies.

angelac

IS-IT--Management
Jul 12, 2001
4
GB
Can anyone tell me how to add a alpha prefix to an autonumber field?
 
An autonumber field can't hold anything but the auto-generated id from access. You can't modify it's value at all without changing the data type, thereby losing the autonumber property. What you can do is make an expression in a query that adds the letters onto the front of the number for you. I have an RMA program that i do this with and i use RMA-00000 as the format. So I have a column in my queries like this:

RMANbr: "RMA-" & Format([MyAutoNumberField],"00000")

then I get what I'm after. Hopefully you can adapt that to your situation.

Joe Miller
joe.miller@flotech.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top