filter subform between two dates without use of query

2e1fmo

New member
Local time
Today, 17:16
Joined
Mar 7, 2002
Messages
9
is it possible to filter a subform which contains the field 'date' into two given dates?

I know you can do it using a query and the between statement. But I cant find a way to do this in VBA. Can anybody help me?

Code would be very much appreciated

Cheers
 
Try searching help for DoCmd.ApplyFilter. You can use a saved filter or text criteria. The latter is likely more flexable.
HTH
Chris
 
I frequently create a criteria form using the date picker control. I set a command button that opens the main form and also sets the filter property of the main form.

frmMainForm.Filter = "[Date] between " & frmCrieriaForm.startdate.value & " and " & frmCriteriaForm.enddate.value

Hope this helps.

Brian
 

Users who are viewing this thread

Back
Top Bottom