- Local time
- Today, 09:24
- Joined
- Feb 19, 2013
- Messages
- 17,372
you can just have one 'master' form with your options on it and a large subform control. Depending on which option is selected, set the subform sourceobject to your form name rather than using docmd.openform
so when your main form opens, set the subform sourceobject to "" and perhaps hide it as well, then assign the form you want opened to the sourceobject and open if hidden once somethign is selected
for example instead of
The openform parameters won't be available but you can instead refer to variables on the main form if required
so when your main form opens, set the subform sourceobject to "" and perhaps hide it as well, then assign the form you want opened to the sourceobject and open if hidden once somethign is selected
for example instead of
Code:
dim wStr as String
dim fName as string
wStr="PK=" & cboCustomerPK
fname=cboFormToOpen
docmd.OpenForm fname,,,wStr
The openform parameters won't be available but you can instead refer to variables on the main form if required
Code:
dim wStr as String
dim fName as string
wStr="PK=" & cboCustomerPK
fname=cboFormToOpen
mySubformname=fname
mySubformname.form.filter=wStr
mySubformname.form.filteron=true