K
Kevin Beck via AccessMonster.com
Hey,
I have a report with a form that I am trying to use to filter and then to
sort results.
You choose a "section #" in a combobox named cboSection between 1 and 30 and
then sort the report up to three levels. When I try to apply the filter I get
msg "Data Type Mismatch in Criteria Expression" Does anyone know how to
remedy this? The following code is from the "on click" event of the "filter"
command button.
Private Sub cmdApplyFilter_Click()
Dim strSection As String
Dim strFilter As String
If IsNull(Me.cboSection.Value) Then
strSection = "Like '*'"
Else
strSection = "='" & strSection & "'"
End If
strFilter = "[Section] " & strSection
With Reports![rptCompGranteeLot]
.Filter = strFilter
.FilterOn = True
End With
End Sub
Many thanks for anyone who might be able to help
Kawg
I have a report with a form that I am trying to use to filter and then to
sort results.
You choose a "section #" in a combobox named cboSection between 1 and 30 and
then sort the report up to three levels. When I try to apply the filter I get
msg "Data Type Mismatch in Criteria Expression" Does anyone know how to
remedy this? The following code is from the "on click" event of the "filter"
command button.
Private Sub cmdApplyFilter_Click()
Dim strSection As String
Dim strFilter As String
If IsNull(Me.cboSection.Value) Then
strSection = "Like '*'"
Else
strSection = "='" & strSection & "'"
End If
strFilter = "[Section] " & strSection
With Reports![rptCompGranteeLot]
.Filter = strFilter
.FilterOn = True
End With
End Sub
Many thanks for anyone who might be able to help
Kawg