SetFocus

  • Thread starter Thread starter John
  • Start date Start date
J

John

How can I set the focus to a field (fld1) that has an
Input Mask? fld1.Setfocus doesn't work on it.

Thanks a lot.
-John
 
The .SetFocus method should work, even if the field has an input mask. Check other
properties of the field.
Do you get an error message?
 
There's limitations to the SetFocus command. For example,
you can't use it to move from a subform to the parent
form. Try using the GoToControl command. If that doesn't
work, email me.
 
In what event are you attempting this?

My guess is that this is a timing issue, e.g. you are trying to do it when
it can't be done, or just before Access moves the focus elsewhere so it does
not achieve the desired result.
 
DanK said:
There's limitations to the SetFocus command. For example,
you can't use it to move from a subform to the parent
form.

??
You can't SetFocus to the parent form itself, but you can SetFocus to a
control on the parent form; e.g.,

Me.Parent!txtID.SetFocus
 
Back
Top