navigating through sub forms

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

Guest

I have a form that has three sub forms on it. On the second subform it is
set to allow several records to be entered continously when tab or enter is
pressed. After you tab out of the last field it goes to the first field in
the record. What I would like to do is if this first field does not have any
data entered and tab or enter is pressed that it will take the user to the
next subform. Thanks for any help.
 
Create a public subroutine in the main form:

Public GoToSub3 ()
DoCmd.GoToControl Me.SubForm3.Name
End Sub

Create a subroutine for the OnExit event of the last field in the second
subform. In the subroutine, check for IsNull([FirstField]). If it is true,
then call the public subroutine of the main form that transfers the focus to
subform 3:

Forms!MainForm.GoToSub3
 
Thanks Kingston. That is what I was looking for.

kingston via AccessMonster.com said:
Create a public subroutine in the main form:

Public GoToSub3 ()
DoCmd.GoToControl Me.SubForm3.Name
End Sub

Create a subroutine for the OnExit event of the last field in the second
subform. In the subroutine, check for IsNull([FirstField]). If it is true,
then call the public subroutine of the main form that transfers the focus to
subform 3:

Forms!MainForm.GoToSub3

Mark said:
I have a form that has three sub forms on it. On the second subform it is
set to allow several records to be entered continously when tab or enter is
pressed. After you tab out of the last field it goes to the first field in
the record. What I would like to do is if this first field does not have any
data entered and tab or enter is pressed that it will take the user to the
next subform. Thanks for any help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top