
Setting focus on subform record
Actually, you need two set focus commands: the first to set focus to the
main form's subform control, and the second to set focus to the control on
the subform.
Me.[SubForm's Control Name Comes Here].SetFocus
Me.[SubForm's Control Name Comes Here]!DesiredControl.SetFocus
SubForm's Control Name Comes Here should be replaced by the actual name of
the subform control (the control that holds the subform).
--
Ken Snell
<MS ACCESS MVP>
Quote:
> hi there
> in the open event of the main form, write
> Me.[SubForm's Control Name Comes Here]!
> DesiredControl.SetFocus
> Erez.
> >-----Original Message-----
> >How do I open a form and have the focus set to a given
> >record in its subform?
> >.