P
PelleritoConsultants
I am learning how to use a list box contained in a form as part of a WHERE
clause;
Is this the right code? When I click on the command button and select the
itmes I want used within my WHERE clause I only get blank records in the
report generated by the command.
Private Sub btn_cmd8_gjl_Click()
On Error GoTo Err_btn_cmd8_gjl_Click
Dim stDocName As String
stDocName = "rptDEPTxLocation-Lysse"
DoCmd.OpenReport stDocName, acPreview, , "[Location] = '" & lst1_gjl & "'"
Exit_btn_cmd8_gjl_Click:
Exit Sub
Err_btn_cmd8_gjl_Click:
MsgBox Err.Description
Resume Exit_btn_cmd8_gjl_Click
End Sub
clause;
Is this the right code? When I click on the command button and select the
itmes I want used within my WHERE clause I only get blank records in the
report generated by the command.
Private Sub btn_cmd8_gjl_Click()
On Error GoTo Err_btn_cmd8_gjl_Click
Dim stDocName As String
stDocName = "rptDEPTxLocation-Lysse"
DoCmd.OpenReport stDocName, acPreview, , "[Location] = '" & lst1_gjl & "'"
Exit_btn_cmd8_gjl_Click:
Exit Sub
Err_btn_cmd8_gjl_Click:
MsgBox Err.Description
Resume Exit_btn_cmd8_gjl_Click
End Sub