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

See the numbers in a cell and if it's less then five chars convert...

Status
Not open for further replies.

Gti

Programmer
Jul 23, 2001
99
PT
I have a cell that should be field with five chars, but my problem is that when the user just insert less chars than five i need to put the missed char as 0!
How can i do this?
How can i run all cells in a table?
 
In the BeforeUpdate event, place code to inspect the control and modify the data if it's less than 5 digits in length:

If Len(MyControl)<5 Then
MyControl = Format(MyControl,&quot;00000&quot;)
End If

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

Part and Inventory Search

Sponsor

Back
Top