We help IT Professionals succeed at work.

Subform - calling procedure

pdvsa
pdvsa asked
Hi Experts,

Is the below correct code to reference a subform: subfrmProjects_Extended_List
I get a syntax error.
The code below is on a button on the Parent but I have added a subform and the [BuyCP] is now on the subform.

DoCmd.OpenForm "frmProjectDetails".subfrmProjects_Extended_List, acFormDS, , , , , OpenArgs:=Me.Buy_CP


Thank you
Comment
Watch Question

Software Team Lead
DoCmd.OpenForm can only open the main form, not the sub form
Mark EdwardsChief Technology Officer
You can only assign the name of a subform to the .SourceObject property of the subform control on the main form.  That's how you "open" a subform.
pdvsaProject finance

Author

Commented:

I didnt ask the question correctly.  I will ask another question.