I have a command buttton on a form that calls a report and filters the report as follows:
My problem is line 10 I don't know how to show No as "No" so the report will see it as a value.
Code:
Private Sub btnLetter_Click()
Dim strSQL As String
Dim stLetter As String
Dim stFilter As String
DoCmd.Close
stLetter = "rptParkingLetter"
DoCmd.OpenReport stLetter, acViewPreview
stFilter = ("Letter2Sent Is Null And InDispute = No And Closed = No")
'Build SQL String
strSQL = strSQL & stFilter & " And "
If strSQL <> "" Then
'Strip Last " And "
strSQL = Left(strSQL, (Len(strSQL) - 5))
'Set the Filter property
Reports!rptParkingLetter.Filter = strSQL
Reports!rptParkingLetter.FilterOn = True
End If
End Sub
Comment