Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Jumping between main form and sub form 1

Status
Not open for further replies.

spruceni

Technical User
May 18, 2007
72
GB
I have a form which consists of a main form and a sub form. With help, I now have the form loading with the focus on the first field of the sub form. This is great.

This form will be used via a screenreader and shortcut keys are so important. It is easy enough to move round the sub form with the tab key but there seems to be no way to jump onto the main form and move round it. Tab just keeps going round and round the subform. I can do it using the cursor and then the tab key. Neither does it seem possible to jump from the main form back to the sub form.

I have looked at the help on Keyboard Shortcuts but they do not work or make the form jump to the next record, which I do not want it to do. (Ctrl Tab)

To enter the subform from the preceding field in the main form TAB

To enter the subform from the following field in the main form SHIFT+TAB

To exit the subform and move to the next field in the master form or next record CTRL+TAB

To exit the subform and move to the previous field in the main form or previous record CTRL+SHIFT+TAB



I have thought of generating a control on the main form which, on using "Alt J" ( J for jump) would jump between the main form to the first field of the sub form and like a flipflop the next time it is used the focus jumps to the first field on the main form. But I can't seem to get this to work.

Any thoughts?
 
You could use an autokeys macro and set focus.
 
Hi

How would I detect if the control that has the current focus is on the mainform or the subform?

I want to write code that would do the following

If mainform has focus then
make subform have focus
else
make mainform have focus
endif


Regards
Alan


 
Have a look at the ActiveControl and PreviousControl properties of the Screen object.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top