G
Guest
I've got a form/subform that opens based on criteria selected in frmCriteria.
There are 3 criteria you can select in frmCriteria. What I'm trying to do
is hide those columns in the subform, based on the selections made in
frmCriteria. This code works if I select each of the criteria individually,
but I get a run time error 2445 "invalid reference to the property
Form/Report" if I select MORE than one criteria. I've got this code in the
Open Event of the main form.
If Forms!frmCriteria!chkModule = -1 Then
Me!sfrmProgramAccess.Form!MODULE.ColumnHidden = True
Else
If Forms!frmCriteria!chkGroup = -1 Then
Me!sfrmProgramAccess.Form!GROUPID.ColumnHidden = True
Else
If Forms!frmCriteria!chkProg = -1 Then
Me!sfrmProgramAccess.Form!PROGRAMID.ColumnHidden = True
End If
End If
End If
What can I do in order to get this to work with multiple criteria?
There are 3 criteria you can select in frmCriteria. What I'm trying to do
is hide those columns in the subform, based on the selections made in
frmCriteria. This code works if I select each of the criteria individually,
but I get a run time error 2445 "invalid reference to the property
Form/Report" if I select MORE than one criteria. I've got this code in the
Open Event of the main form.
If Forms!frmCriteria!chkModule = -1 Then
Me!sfrmProgramAccess.Form!MODULE.ColumnHidden = True
Else
If Forms!frmCriteria!chkGroup = -1 Then
Me!sfrmProgramAccess.Form!GROUPID.ColumnHidden = True
Else
If Forms!frmCriteria!chkProg = -1 Then
Me!sfrmProgramAccess.Form!PROGRAMID.ColumnHidden = True
End If
End If
End If
What can I do in order to get this to work with multiple criteria?