Try adding these 2 lines to the Open event procedure of the form, i.e.:
Private Sub Form_Open(Cancel As Integer)
Me.Filter = "Year([chktran].[CheckDate]) >= 2004"
Me.FilterOn = True
End Sub
If you still can't get that working, you could create a query that filters
and sorts as you wish, and use the query as the RecordSource of the form.
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Reply to group, rather than allenbrowne at mvps dot org.
nach said:
Yes You wrote the following
The Format() function returns a string value.
ry taking the Year() of the date field instead i.e.:
.Filter = "Year([chktran].[CheckDate]) >= 2004"
.FilterOn = True
It is important to set the FilterOn property at runtime as well
I Did as you said in my Data Tab and it's not working
I am not sure what you mean at run time
does .Filter = "Year([chktran].[CheckDate]) >= 2004" have to be coded
somewhere in the form and if yes where ?
Thanks for your reply