Charlotte Foust
cfoust at infostatsystems.com
Fri Sep 16 18:12:05 CDT 2005
Try: Me.FilterOn = False Me.Filter = strFilter Me.Filteron = True You can't change a filter when FilterOn is true Charlotte Foust -----Original Message----- From: Rocky Smolin - Beach Access Software [mailto:bchacc at san.rr.com] Sent: Friday, September 16, 2005 3:20 PM To: AccessD at databaseadvisors.com Subject: [AccessD] Can't Set Filter 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 -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com