ACC2000 Tab Order - Multiple subforms

B

BrentDA

I have a form with multiple subforms and I'm trying to make the form so that
after tabbing through the all the fields on the first subform, it then tabs
to the first field on the next subform.

As it currently stands, it tabs through all the fields on the FIRST subform
correctly, then it tabs back to the first field on the FIRST subform again.

I checked the tab order on the main form and it lists all the subforms in
the correct order. It just doesn't want to automatically tab from one
subform to the next subform.

Any assistance is greatly appreciated !! Thanks !!

Brent
 
M

Mark Anders

Hi!

Put the last field in the form an event procedure like this:

Private Sub LastField_Exit(Cancel As Integer)
Form!NextFormName.SetFocus
End Sub
 
B

BrentDA

Hi Mark,

Thanks for your help !!!

I put the code in the last field of the first subform [Event Procedure 'On
Exit'] and it gives me the following error message:

Run-time error '2465': Microsoft Access can't find the field
'NTP_DPU_DPM_SUBFORM' referred to in your expression.

NOTE that 'NTP_DPU_DPM_SUBFORM' is the name of the 2nd (correct) subform,
and the first field in the 2nd subform is called TA3R325.

ALSO NOTE that I have the following 'On Open' code in each of the subforms
to tell each subform to open to a new 'blank' record when I open the main
form:

Private Sub Form_Open(Cancel As Integer)
DoCmd.GoToRecord , , acNewRec

Thanks !

Brent

End Sub
 
M

Mark Anders

Hi Brent!

I have a form "Orders" with subform "Details". Last field (Division) in the
Main form includes following code:

Private Sub Division_Exit(Cancel As Integer)
Form!Details.SetFocus
End Sub

This code works properly in my form.
--
Have a Nice Day!


"BrentDA" kirjoitti:
Hi Mark,

Thanks for your help !!!

I put the code in the last field of the first subform [Event Procedure 'On
Exit'] and it gives me the following error message:

Run-time error '2465': Microsoft Access can't find the field
'NTP_DPU_DPM_SUBFORM' referred to in your expression.

NOTE that 'NTP_DPU_DPM_SUBFORM' is the name of the 2nd (correct) subform,
and the first field in the 2nd subform is called TA3R325.

ALSO NOTE that I have the following 'On Open' code in each of the subforms
to tell each subform to open to a new 'blank' record when I open the main
form:

Private Sub Form_Open(Cancel As Integer)
DoCmd.GoToRecord , , acNewRec

Thanks !

Brent

End Sub

Mark Anders said:
Hi!

Put the last field in the form an event procedure like this:

Private Sub LastField_Exit(Cancel As Integer)
Form!NextFormName.SetFocus
End Sub
--
Have a Nice Day!


"BrentDA" kirjoitti:
 
B

BrentDA

I solved the tabbing problem by making several new forms (no subforms) and
having a 'button' form direct users to correct form. Each form now tabs
through correctly.

Thanks Mark!

Mark Anders said:
Hi Brent!

I have a form "Orders" with subform "Details". Last field (Division) in the
Main form includes following code:

Private Sub Division_Exit(Cancel As Integer)
Form!Details.SetFocus
End Sub

This code works properly in my form.
--
Have a Nice Day!


"BrentDA" kirjoitti:
Hi Mark,

Thanks for your help !!!

I put the code in the last field of the first subform [Event Procedure 'On
Exit'] and it gives me the following error message:

Run-time error '2465': Microsoft Access can't find the field
'NTP_DPU_DPM_SUBFORM' referred to in your expression.

NOTE that 'NTP_DPU_DPM_SUBFORM' is the name of the 2nd (correct) subform,
and the first field in the 2nd subform is called TA3R325.

ALSO NOTE that I have the following 'On Open' code in each of the subforms
to tell each subform to open to a new 'blank' record when I open the main
form:

Private Sub Form_Open(Cancel As Integer)
DoCmd.GoToRecord , , acNewRec

Thanks !

Brent

End Sub

Mark Anders said:
Hi!

Put the last field in the form an event procedure like this:

Private Sub LastField_Exit(Cancel As Integer)
Form!NextFormName.SetFocus
End Sub
--
Have a Nice Day!


"BrentDA" kirjoitti:

I have a form with multiple subforms and I'm trying to make the form so that
after tabbing through the all the fields on the first subform, it then tabs
to the first field on the next subform.

As it currently stands, it tabs through all the fields on the FIRST subform
correctly, then it tabs back to the first field on the FIRST subform again.

I checked the tab order on the main form and it lists all the subforms in
the correct order. It just doesn't want to automatically tab from one
subform to the next subform.

Any assistance is greatly appreciated !! Thanks !!

Brent
 

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

Top