How to address subform in DoCmd?

flofi

Registered User.
Local time
Today, 07:49
Joined
Sep 20, 2004
Messages
15
Hi

How can I address a subform with DoCmd. E. g. to save the current record or goto another record in the subform. I can't use Me... because the command button is located in the mainform.

When I was using
Call DoCmd.GoToRecord(acDataForm, subformName, acGoTo, recordIndex)
the subform was not found because it is not open.

Thanks
 
use two set focus statements

.yourSubFormName.SetFocus
SomeControlOnSubForm.SetFocus
DoCmd. GoToRecord acNewRec
 

Users who are viewing this thread

Back
Top Bottom