I figured it out:
Change the data type to number, and then Format/00000.
Note that this will *DISPLAY* with leading zeros but will not *STORE* leading
zeros. The numbers 123, 00123, and 000000000000123 are all exactly the same
number and - in a number field - will be indistinguishable.
If this "number" is an identifier (such as a US Zip code or an item number),
then it should be stored in a Text field, not a number field. You can use an
input mask of
"00000"
to force entry of five numeric digits, or some code in the AfterUpdate event
of a form textbox to zero fill:
Private Sub txtTextbox_AfterUpdate()
If Len(Me!txtTextbox) < 5 Then
Me!txtTextbox = Right("00000" & Me!txtTextbox, 5)
End If
End Sub