subform to subform

J

JohnE

I have a main form with 2 subforms on it. I would like to tab from one
subform to the next. I'm trying to use the OnExit of the last control in
subformA and set focus of the first control in subformB but it just isnt'
working.

I need help on the correct way to reference it all.

Thanks.
 
M

Maurice

John,

I don't know what you have tried yet but it could look something like this:

private sub controlname On_Exit

forms!mainformname!subformnameB.form.controlname.setfocus

replace the form and controlnames accordingly.
hth
end sub
 
M

Maurice

hmmm,

sorry about the answer John, that isn't going to work. I'll take a closer
look at it.
 
T

tina

try

Me.Parent!SubformB.SetFocus
Me.Parent!SubformB.Form!ControlName.SetFocus

replace ControlName with the correct name of the control in subformB, of
course. and make sure that you're using the correct name to refer to
subformB. to find it, open the mainform in Design view. within the mainform,
click *once* on subformB to select it. in the Properties box, click the
Other tab and look at the Name property. *that name* is the name you'll use
in the code above, in place of SubformB.

hth
 

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