Hi Una
I would not bother with a mask. - Up to you though.
If you are using a form to update the record I would use the AfterUpdate
event of the control to alter the data. Something like this
Private Sub FieldName_AfterUpdate()
If Len(Me.FieldName) < 5 Then
Me!FieldName = Right("0000" & Me!FieldName, 4)
End If
End Sub
Change "FieldName" to what it is on the form and it should be OK.
If the data is "always" 4 digits you could set this as a variable and use
something like this
Private Sub FieldName_AfterUpdate()
Dim SomeName As Long
If SomeName = Len("FieldName") < 4 Then
Me!FieldName = Right("0000" & Me!FieldName, 4)
End If
End Sub
Change FieldName again and I wouldn't use "SomeName" so change this as well.
Note this will of course trim the data to 4 so don't use if this is not
what you want (not really sure from your post). Or include an "else" to the
above to show longer strings.
Hope this helps