Moving focus from subform to main

  • Thread starter Thread starter DEVOURU
  • Start date Start date
D

DEVOURU

I would like to be able to have the focus go from the last field entry in a
subform to a control source in the main form. Ideas?

TIA, -JS
 
Hi Devouru

Look at the SetFocus method in Help

For example, if you want to set focus on a particular form on your main form,
the syntax would be as follows:

forms!MyMainForm!MyMainFormControl.SetFocus

Hope this helps

Best Regards

Maurice St-Cyr
Micro Systems Consultants, Inc.
 
In the last fields after update event on the sub-form, you can go:


me.Parent.SetFocus
me.Parent.CompanyName.SetFocus
 
Thankx for the reply. I found my mistake. I was using the complete systax
forms!mymainform!control instead of control name only., I'm good to go.

-JS
 
Albert D. Kallal said:
In the last fields after update event on the sub-form, you can go:


me.Parent.SetFocus
me.Parent.CompanyName.SetFocus

I don't believe it's necessary to SetFocus to the parent first. When
moving upward from a subform, unless I'm mistaken, it's enough to
SetFocus to the control on the parent form.
 
Back
Top