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!

Input Mask/AutoNumber??

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi....

Is there a way to create an input mask in conjunction with an AutoNumber?

For example:

ID number: bm-1001-02
next ID: SL-1002-02
next ID: bm-1003-01

Basically, I would like Access to increase the middle number by 1 for each new record added, but the first 2 and the last 2 characters will vary depending on the type of record I am creating. Is there a way to do this??

Thanks very much!!!
 
There is - Yes - BUT you'd be better of splitting the field into two or three fields

Fields
Prefix Type Text, Chars 2
Sequence Type AutoNumber
Suffix Type Number, Integer ( Or Byte possibly )

Set the Prefix and Suffix depending on the 'type of record' then on the Form/Report you can combine the three foelds to display the codeNumber

txtCodeNumber = Prefix & " - " & Sequence & " - " & Suffix




'ope-that-'elps.

G LS
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top