Link to home
Start Free TrialLog in
Avatar of mlagrange
mlagrangeFlag for United States of America

asked on

DoCmd.GotoRecord on a subform?

Hello - how do you reference a subform in the {ObjectName} arg of DoCmd.GoToRecord?

I have a global module for form operations where I do common things for Open, Current, add's, edit's, deletes, etc.  I pass the form as an object variable. This has worked well in the past, on stand-alone forms, but now I'm trying to re-work it to handle forms that are open as subforms. For my add routine, I go to the NewRecord:

DoCmd.GoToRecord acDataForm, frmThisForm.Name, acNewRec

It errors back with "(subform name) isn't open"

Thanks

ASKER CERTIFIED SOLUTION
Avatar of Bitsqueezer
Bitsqueezer
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mlagrange

ASKER

THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU!
I have been stumped on this for hours!
No problem, you're welcome...:-)