go to control

S

smk23

What is wrong with this syntax? I get an error of wrong data type for one of
the arguments.

DoCmd.GoToControl Me.frmPatientPhone.Form.PhoneTypeID

Thanks
 
M

Maurice

Why not use: Me.frmPatientPhone.Form.PhoneTypeID.setfocus
Should do the same thing.
 
D

Douglas J. Steele

It depends on where the focus currently is.

If it's on the parent form or on a different subform, it's necessary to set
focus to the desired subform first.

In other words, you'd need

Me.frmPatientPhone.SetFocus
Me.frmPatientPhone.Form.PhoneTypeID.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