Hi There,
I have run into a problem I haven't been able to work around. I have a complete database where I open all my form mostly using this type of command: DoCmd.OpenForm "frmOrders".
Now I am trying to redesign my database using a sourceobject where I can open all my forms directly into on the main menu instead of using separate forms.
The challange I seem to be having now is that instead opening my form using this code:
DoCmd.OpenForm "frmOrders", , , , , , Me.txtUser
I want to open my form using:
With Forms("frmMainMenu")!Subform
.SourceObject = "frmOrders"
End With
But I don't know how to pass the openargs (, , , , , , Me.txtUser). It's giving me errors.
How can I resolve this please?
Thanks.
I have run into a problem I haven't been able to work around. I have a complete database where I open all my form mostly using this type of command: DoCmd.OpenForm "frmOrders".
Now I am trying to redesign my database using a sourceobject where I can open all my forms directly into on the main menu instead of using separate forms.
The challange I seem to be having now is that instead opening my form using this code:
DoCmd.OpenForm "frmOrders", , , , , , Me.txtUser
I want to open my form using:
With Forms("frmMainMenu")!Subform
.SourceObject = "frmOrders"
End With
But I don't know how to pass the openargs (, , , , , , Me.txtUser). It's giving me errors.
How can I resolve this please?
Thanks.