R
RoadKyng
I have the following code in a report that will use the date fields if
selected, but inserts wildcards to get any available date. I am getting a
syntax error. The report filter is also shown below:
'CHECK FOR DATE RANGES
If IsNull(Me.DateIN.Value) Then
DateIN = "Like '*'"
Else
DateIN = Me.DateIN
End If
If IsNull(Me.DateOUT.Value) Then
DateOUT = "Like '*'"
Else
DateOUT = Me.DateOUT
End If
'SET THE REPORT FILTER
strFilter = "[CorpName] " & strSELECT & " AND [Status] " &
strSTATUS & " AND [Certificate] " & strCertificate & " AND [TrainingDate] " &
"Between #" & DateIN & "# and #" & DateOUT & "#"
I have verified the report works if the dates are supplied but I get an
error if left blank. I have searched the help files and the user groups to no
avail.
GmH
selected, but inserts wildcards to get any available date. I am getting a
syntax error. The report filter is also shown below:
'CHECK FOR DATE RANGES
If IsNull(Me.DateIN.Value) Then
DateIN = "Like '*'"
Else
DateIN = Me.DateIN
End If
If IsNull(Me.DateOUT.Value) Then
DateOUT = "Like '*'"
Else
DateOUT = Me.DateOUT
End If
'SET THE REPORT FILTER
strFilter = "[CorpName] " & strSELECT & " AND [Status] " &
strSTATUS & " AND [Certificate] " & strCertificate & " AND [TrainingDate] " &
"Between #" & DateIN & "# and #" & DateOUT & "#"
I have verified the report works if the dates are supplied but I get an
error if left blank. I have searched the help files and the user groups to no
avail.
GmH