Go To Control

I

Ivor Williams

I have a form frmProjects. On the form is an unbound combo box (cboProject)
used to select a Project. On the form there is also a tab control with a
number of pages, each with a subform linked to the frmProjects form.
After the value in cboProject on the main form is updated, I want the focus
to shift to combo box cboEmployee on the sfrTimeline subform on a tabbed
page. I need some help with referencing the various controls in VBA to make
this happen, please.

Ivor
 
K

Ken Snell \(MVP\)

To set focus to a control within a subform, you need to do two SetFocus
actions. The first sets focus on the subform control (the actual control
that holds the subform object on the main form); the second sets focus on
the control in the subform.

Me.NameOfSubformControl.SetFocus
Me.NameOfSubformControl.Form.NameOfControlInSubform.SetFocus
 

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

Similar Threads


Top