navigation

S

SAC

How do I go from a dropdown box on a main form to a control on a subform?

Forms![frmARTRH]![ARTRL subform].Form![Qty].setfocus doesn't work.

and docmd.gotocontrol "Forms![frmARTRH]![ARTRL subform].Form![Qty]" doesn't
seem to work.

Thanks.
 
V

Van T. Dinh

Set the Focus to the SubformControl first.

Forms!MainForm.SubformControl.SetFocus

then your statement.

HTH
Van T. Dinh
MVP (Access)
 
S

Sandra Daigle

To set focus to the subform control from the main form, you must first set
focus to the subform control itself:

me.sfrmSub1.setfocus
me.sfrmSub1.form.txtMyControl.setfocus
 
S

SAC

Thanks!

Van T. Dinh said:
Set the Focus to the SubformControl first.

Forms!MainForm.SubformControl.SetFocus

then your statement.

HTH
Van T. Dinh
MVP (Access)



-----Original Message-----
How do I go from a dropdown box on a main form to a control on a subform?

Forms![frmARTRH]![ARTRL subform].Form![Qty].setfocus doesn't work.

and docmd.gotocontrol "Forms![frmARTRH]![ARTRL subform].Form![Qty]" doesn't
seem to work.

Thanks.



.
 
S

SAC

Thanks!
Sandra Daigle said:
To set focus to the subform control from the main form, you must first set
focus to the subform control itself:

me.sfrmSub1.setfocus
me.sfrmSub1.form.txtMyControl.setfocus

--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this newsgroup.
How do I go from a dropdown box on a main form to a control on a subform?

Forms![frmARTRH]![ARTRL subform].Form![Qty].setfocus doesn't work.

and docmd.gotocontrol "Forms![frmARTRH]![ARTRL subform].Form![Qty]"
doesn't seem to work.

Thanks.
 
Top