Need syntax to move focus from Subform to Main Form

A

Alex

I have a subform (Subform 1) nested in a mainform and they
are linked together from an entry field on the main form.
There should only be one record in the subform (based upon
the parent field in the main form).

What I want to do is after data is input for the final
field on the subform, I want to focus/cursor to move from
the final field on Subform 1(without moving to a new
record), and the focus moving to a field on another
subform (Subform 2) nested in the main form.

Please help!! I have been trying to use a macro on the
final field in Subform 1 that occurs On Exit and is
comprised of Goto Control ..., but it is not working.

Thanks,

Alex
 
K

Ken Snell

You need three GoToControl actions in a row, I believe, to do this (set
focus to main form's control, set focus to second subform control, and then
set focus to the control on the second subform):

Action: GoToControl
Control Name: Forms!MainFormName!ControlName

Action: GoToControl
Control Name: Forms!MainFormName!SecondSubformName

Action: GoToControl
Control Name: Forms!MainFormName!SecondSubformName!AnotherControlName

Note that SecondSubformName is the name of the subform control that holds
the actual subform object for the second subform. Change the other generic
words to their actual names.
 

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