G
Guest
With the code below I'm trying to filter a combo box on a sub form based on a
selection made on a combo box from the main form. Main form cbo is
cboOPmedsClass and sform cbo is cboOPmedsLU
I'm getting a syntax error at the end of the WHERE statement, "expected lsit
separator or ). I'm not sure how to address this and I'm not sure if I'm
referencing the controls correctly.
Any guidance would be greatly appreciated. Thanks, Rob
**********************************************************
Me.fsubOPmeds!cboOPmedsLU = Null
If IsNull(Me.cboOPmedsClass) Then
Me.fsubOPmeds!cboOPmedsLU.Enabled = False
Else
Me.fsubOPmeds!cboOPmedsLU.Enabled = True
Me.fsubOPmeds!cboOPmedsLU.Rowsource = ReplaceWhereClause
(Me.fsubOPmeds!cboOPmedsLU.Rowsource, _
"Where fldClassification = " & Me!cboPOmedsClass"
Me.fsubOPmeds!cboPOmedsLU.Requery
End If
End Sub
selection made on a combo box from the main form. Main form cbo is
cboOPmedsClass and sform cbo is cboOPmedsLU
I'm getting a syntax error at the end of the WHERE statement, "expected lsit
separator or ). I'm not sure how to address this and I'm not sure if I'm
referencing the controls correctly.
Any guidance would be greatly appreciated. Thanks, Rob
**********************************************************
Me.fsubOPmeds!cboOPmedsLU = Null
If IsNull(Me.cboOPmedsClass) Then
Me.fsubOPmeds!cboOPmedsLU.Enabled = False
Else
Me.fsubOPmeds!cboOPmedsLU.Enabled = True
Me.fsubOPmeds!cboOPmedsLU.Rowsource = ReplaceWhereClause
(Me.fsubOPmeds!cboOPmedsLU.Rowsource, _
"Where fldClassification = " & Me!cboPOmedsClass"
Me.fsubOPmeds!cboPOmedsLU.Requery
End If
End Sub