Hello to everybody.
In a textbox I shoult type the value from 1 to 9 in the following way: 01,
02, 03, 04, 05, etc
However may times I type only one digit: 1, 2, 4, 5, etc.
Is there a way to get always as result 01, 02, 03.
This way will help me a lot during the report sorted out by column
Thanks for your help and regards
John
fredg - 20 May 2007 07:37 GMT
> Hello to everybody.
> In a textbox I shoult type the value from 1 to 9 in the following way: 01,
[quoted text clipped - 5 lines]
> Thanks for your help and regards
> John
Make the field a Text datatype field.

Signature
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
missinglinq - 20 May 2007 11:25 GMT
As Fred wrote, make the field a Text datatype field, then:
Private Sub YourFieldName_Exit(Cancel As Integer)
If Len(Me.YourFieldName) < 2 Then
Me.YourFieldName = "0" & Me.YourFieldName
End If
End Sub
John - 22 May 2007 22:20 GMT
Many thanks for your help. It's what I am looking for.
Regards
John