SetFocus question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

This should be basic, but I must be missing something. I have a main form
with three subforms. When the user updates a field in my subform
(continuous), I want to move focus to another subform on my main form. I
have the event procedure on After Update and no matter what I use for my
expression, Access cannot find the subform that I want to set focus to. Any
ideas?

Thanks!!
 
You need to set the focus twice in order to get focus onto a control in a
subform. For your situation, the steps would look something like this when
run from the first subform:

Me.Parent.SecondSubform.SetFocus
Me.Parent.SecondSubform.Form.ControlName.SetFocus

where SecondSubform is the name of the subform control (the control that
holds the second subform).
 
Back
Top