[AccessD] Can't Set Filter

Rocky Smolin - Beach Access Software bchacc at san.rr.com
Fri Sep 16 17:19:30 CDT 2005


Dear List:

Can anyone see why the following code should generate the error 2448 - you can't assign a value to this object in the line Me.Filter = strFilter?

Private Sub SetFilter()

Dim strFilter As String

    strFilter = ""
    If IsDate(txtDateFilterStart) Then
        strFilter = strFilter & "fldPMScheduleStartDate >= #" & txtDateFilterStart & "#"
    End If
    
    If IsDate(txtDateFilterEnd) Then
        If strFilter <> "" Then strFilter = strFilter & " AND "
        strFilter = strFilter & "fldPMScheduleEndDate =< #" & txtDateFilterEnd & "#"
    End If
    
    If strFilter = "" Then
        Me.Filter = ""
        Me.FilterOn = False
    Else
        Me.Filter = strFilter
        Me.FilterOn = True
    End If
    
    Me.Requery
    
End Sub


MTIA,

Rocky



More information about the AccessD mailing list