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

Additions to String 1

Status
Not open for further replies.
Feb 25, 2008
46
US
I have a form that needs to display employee details such as employee name, manager's name, date of employment and so on when the ID number is entered in an unbounded textbox.

The form is working.

The ID number is in the text form in the original table. The ID numbers range from 1 to 7 digits.

I need to write a code on the lost focus property of the ID text box such that when the user enters his or her ID and if it is less than 7 digits, the lost focus event automatically adds the necessary number of zeros to the left of the ID to maintain the ID in the standard 7-digit format.

Please help.

Thanks in advance,
Mark.
 
ty
metextbox = format(me.textbox,"0000000")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top