A
Amit
Hi,
I have a form which includes a sub-form. What I'm trying
to accomplish is that when a user is entering data on the
form and moves from one control to the next using TAB,
s/he is able to move to the first control on the sub-form
from the last control on the main-form.
To accomplish this, I added an unbound text-box control on
the main form, and in the "Got Focus" property of the
control, I added the following code:
=========================================================
Private Sub txtTabToDate_GotFocus()
'move focus to the date field in the sub-form
Me!sfrmPerson.Form!SurveyCompletedDate.SetFocus
End Sub
=========================================================
What happens is that as soon as I tab into the unbound
text control, the cursor stays there, and moves to the
desired control only when I press TAB another time.
I guess the problem is how I'm referencing the control on
the sub-form from the main-form. I thought I had it right,
but I guess not.
Any help on the correct reference (assuming that's the
problem here) in the above code will be much appreciated.
The name of the sub-form control on the main-form
is "sfrmPerson", and the control I'd like to move to
is "SurveyCompletedDate".
Thanks!
-Amit
I have a form which includes a sub-form. What I'm trying
to accomplish is that when a user is entering data on the
form and moves from one control to the next using TAB,
s/he is able to move to the first control on the sub-form
from the last control on the main-form.
To accomplish this, I added an unbound text-box control on
the main form, and in the "Got Focus" property of the
control, I added the following code:
=========================================================
Private Sub txtTabToDate_GotFocus()
'move focus to the date field in the sub-form
Me!sfrmPerson.Form!SurveyCompletedDate.SetFocus
End Sub
=========================================================
What happens is that as soon as I tab into the unbound
text control, the cursor stays there, and moves to the
desired control only when I press TAB another time.
I guess the problem is how I'm referencing the control on
the sub-form from the main-form. I thought I had it right,
but I guess not.
Any help on the correct reference (assuming that's the
problem here) in the above code will be much appreciated.
The name of the sub-form control on the main-form
is "sfrmPerson", and the control I'd like to move to
is "SurveyCompletedDate".
Thanks!
-Amit