I have two strWhere statements in some VB code, each representing a list box. Individually they work but when I try to combine them I get either #Error when I make a selection from both list boxes or a syntax error 3075 when only one list box is selected. Currently I tried combining the two strWhere statements as such:
strWhere = strWhereMaterial & " And " & strWherePlant
Then I put the "strWhere" into the open report command:
DoCmd.OpenReport strDoc, acViewPreview, , WhereCondition:=strWhere, OpenArgs:=strDescrip
Any suggestions?
strWhere = strWhereMaterial & " And " & strWherePlant
Then I put the "strWhere" into the open report command:
DoCmd.OpenReport strDoc, acViewPreview, , WhereCondition:=strWhere, OpenArgs:=strDescrip
Any suggestions?