Tab Order In Subforms

J

Jewelle Tan

Hi, I'm an amateur developer and have a tab problem which is probably very
trivial but is driving me mad! Would appreciate help.

I have the following forms hierarchy:

Main Form - where I enter Transmittal number
Subform1 - where I enter Document info
Subform2 (within Subform1) - where I enter Items info (per Document)

My problem is that when I after entering the second/subsequent record for
Subform1 and then pressing TAB to go to Subform2, the cursor goes to the last
field of Subform2 (instead of the first field, which I have set in order in
Tab Order Control). It works fine for the first record of the Subform1 though.

I tried making a macro to direct the Tab to gotocontrol first field, but an
error message that says the field is not found appears!

As I'm still an amateur so at the moment, I'm more comfortable using macros
instead vba so if I can get help in this matter, I greatly appreciate it!

Thanks a bunch!
 
P

Paul

Pressing the tab key will take you from the main form to a subform (when it
is the next control in the tab list).

To 'get out' of the subform and back onto the main form, press Ctrl+Tab
(this will move you to the next control in the tab order on the main form)..

If the default behavour above does not suit your needs you could try adding
a control to the footer section of subform1 and setting it to be the last
control in the tab order for that form. Then tie a macro to the GotFocus
event that actually moves the focus to the next control (on the main form or
subform2 as appropriate).
 

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