Solved How can I Hide Access And only view Forms (2 Viewers)

CJ_London

Super Moderator
Staff member
Local time
Today, 10:10
Joined
Feb 19, 2013
Messages
16,607
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

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
 

Users who are viewing this thread

Top Bottom