Vertical scrollbar on subform doesn't move with setfocus

K

kheisler6

I'd like the user to click a label on the main form and have the focus
jump to a control on a subform. The subform is in form view, not
continuous view. My setfocus codes works in that the cursor jumps to
the control (I can see the control's caption in the status bar), but
the vertical scrollbar only moves down about an inch, so the real
"focus" doesn't really change. This is a tall subform.

This is the code I'm using for the label on the main form:

Private Sub lblMaritalStatus_Click()
Me.frmReferrals.SetFocus
Me!frmReferrals.Form!txtMaritalStatus.SetFocus
End Sub

If I put the label on the subform, I get the same problem.

Any ideas?

Kurt
 

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

Top