M
Maz Ten
When I put the following code in a form attached to a command button I get a
message saying I can't assign a value to this property then when I debug it
high lights what I have indicated.
Can anyone tell me what to do to overcome this. I am desperate to filter my
form
Dim strFilter As String
Dim lngLen As Long
If Not IsNull(Me.txtFilterState) Then
strFilter = strFilter & "([State] = """ & Me.txtFilterState & """)AND"
End If
lngLen = Len(strFilter) - 5 'Without trailing "AND"
If lngLen < 1 Then
MsgBox "No Criteria"
Else
Me.Filter = Left(strFilter, lngLen) THIS IS HIGH LIGHTED AS can't assign a
value
Me.FilterOn = True
End If
Thanks in advance
Maz T
message saying I can't assign a value to this property then when I debug it
high lights what I have indicated.
Can anyone tell me what to do to overcome this. I am desperate to filter my
form
Dim strFilter As String
Dim lngLen As Long
If Not IsNull(Me.txtFilterState) Then
strFilter = strFilter & "([State] = """ & Me.txtFilterState & """)AND"
End If
lngLen = Len(strFilter) - 5 'Without trailing "AND"
If lngLen < 1 Then
MsgBox "No Criteria"
Else
Me.Filter = Left(strFilter, lngLen) THIS IS HIGH LIGHTED AS can't assign a
value
Me.FilterOn = True
End If
Thanks in advance
Maz T