Redirect Control Focus

R

=Ray=

I have a form with a subform, and if you tab through the subform's fields,
after the last field, it tabs back to the first field on a new record. But
instead of this, I want it to send the focus to a different control (on the
main form) when you tab out of that field.

The problem is I don't see any method to do this. I'm thinking there should
be a
ControlA.Sendfocus ControlB
method or something that I can put in the ControlA_LostFocus Procedure.

Can someone tell me how I can accomplish this?
Thanks,
Ray
 
K

Klatuu

Use the LostFocus event of the last control on the subform

Me.Parent.ControlName.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

Top