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 masks?

Status
Not open for further replies.

circles

Technical User
Feb 12, 2001
26
US
I have a form that users enter account numbers into. All accounts start with a leading zero followed by a 7 digit number with no spaces or dashes etc. For example 01189703.
Is there any way I can format the account number field so that it automatically have the leading zero shown and all the user would have to do is enter the 7 digit account number?

Thanks for your input
 
Put the following code in the After Update event of the field you are having them enter into:

me!Account = format(me!Account,"00000000")

This will take whatever they enter and add leading zeroes to make it an 8 byte field.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top