D
dgunning
When entering data into the location field of my table, I want the users to
be able to eliminate any leading zeros from the location number. I will fill
them in myself so that "587" will be changed to "00587". I do this by the
following:
Private Sub Location_Exit(Cancel As Integer)
Me.Location = Format(Me.Location, "00000")
End Sub
I also want focus to be transferred to the location field if the user clicks
on the new record button, so I have the following Current event.
Private Sub Form_Current()
Me.Location.SetFocus
End Sub
This combination gives me a big problem though. When I open the form and
try to navigate through the records (using the built-in next and previous
buttons at the bottom of the form), I cannot get off the first record. If I
comment out the current event handler, then I can navigate as expected.
Any ideas on how I can get this form to act the way I want? Thanks for any
help!
dg
be able to eliminate any leading zeros from the location number. I will fill
them in myself so that "587" will be changed to "00587". I do this by the
following:
Private Sub Location_Exit(Cancel As Integer)
Me.Location = Format(Me.Location, "00000")
End Sub
I also want focus to be transferred to the location field if the user clicks
on the new record button, so I have the following Current event.
Private Sub Form_Current()
Me.Location.SetFocus
End Sub
This combination gives me a big problem though. When I open the form and
try to navigate through the records (using the built-in next and previous
buttons at the bottom of the form), I cannot get off the first record. If I
comment out the current event handler, then I can navigate as expected.
Any ideas on how I can get this form to act the way I want? Thanks for any
help!
dg