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

How to generate auto number with a letter at front

Status
Not open for further replies.

Jorge555

Technical User
Oct 25, 2001
3
US
Can anybody tell me how to generate an auto number with a letter at front.
Lets say that I will add a new record and I want to star M400 and next time that I add a record it will be M401 and so on..
Is that possible???
Thanks in advance for the help.
 
I'm not sure if this is the correct way, but in your design view of your table against the Autonumber field in the format section enter "M"400.
 
what I have done in the past is to have a field in my table lets say "MasterNumber", regular text field and a second field called "num" (autonumber) I then use the following code in the BeforeUpdate of the Form property-

Private Sub Form_BeforeUpdate(Cancel As Integer)
Me.QCProject = "QC" & Me.num
End Sub

to create a "MasterNumber" of QC123....... or whatever then next autonumber is.

HTH

Davidd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top