hello,
i have a form in which i select a job no in a list box, that then showes the relevant tasks for that job in another list box in which multiple select is allowed. i then put the folliwing code behind the view report button
Private Sub cmdPrint_Click()
Dim strWhere As String
strWhere = "[JobNumberFieldName] = " & Me!lstJobNumberListBox
strWhere = strWhere & " AND [TaskNumberFieldName] In "
strWhere = strWhere & fustrCriteriaFromListbox(Me!lstTheTaskListBoxControlName
DoCmd.OpenReport "ReportName",,,strWhere
End Sub
but when i select everything i need to on the form and press the button i get the following error:
In Operator Without () In query expression '([JobNo] = 172/03 AND [TaskNo] In)'
Any Ideas what im doing wrong?
Thanks
i have a form in which i select a job no in a list box, that then showes the relevant tasks for that job in another list box in which multiple select is allowed. i then put the folliwing code behind the view report button
Private Sub cmdPrint_Click()
Dim strWhere As String
strWhere = "[JobNumberFieldName] = " & Me!lstJobNumberListBox
strWhere = strWhere & " AND [TaskNumberFieldName] In "
strWhere = strWhere & fustrCriteriaFromListbox(Me!lstTheTaskListBoxControlName
DoCmd.OpenReport "ReportName",,,strWhere
End Sub
but when i select everything i need to on the form and press the button i get the following error:
In Operator Without () In query expression '([JobNo] = 172/03 AND [TaskNo] In)'
Any Ideas what im doing wrong?
Thanks