Focus Error

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a couple controls on a form with input masks. I received a tip on how
to set the focus at the beginning of the field for data entry: it is the
following on the on focus event of the control:

Private Sub Telephone_Nbr_GotFocus()
Me.SelStart = 0
End Sub

I am getting a compile error though - it happens when I click in the field -
it is error #461 Method or Data Member not found. I'm not sure why this is
happening - I just wanted a way for the user to not start entering data in
the middle of the field an have to start over because their cursor was in the
middle of the input mask.

Thanks for any help!
 
You need to include the name of your control:
Me.SelStart = 0
should be
Me.Telephone_Nbr.SelStart = 0
 
Back
Top