Rocky Smolin - Beach Access Software
bchacc at san.rr.com
Fri Sep 16 20:40:56 CDT 2005
Charlotte: Changed code to: If strFilter = "" Then Me.Filter = "" Me.FilterOn = False Else Me.FilterOn = False Me.Filter = strFilter Me.FilterOn = True End If but no soap. :( I've never had a problem pushing a filter string into a form. The filter might have been invalid or had bad syntax but I never got stopped at the door before. Regards, Rocky ----- Original Message ----- From: "Charlotte Foust" <cfoust at infostatsystems.com> To: "Access Developers discussion and problem solving" <accessd at databaseadvisors.com> Sent: Friday, September 16, 2005 4:12 PM Subject: Re: [AccessD] Can't Set Filter > 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 > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com >