Date filter (1 Viewer)

Fabian1675

Registered User.
Local time
Yesterday, 17:50
Joined
May 5, 2011
Messages
23
Hello everyone, I got a quick question to the experts

I have a form that has 3 textboxes named: StartDate, EndDate and Name. What I'm trying to do is have the user enter a start and end date then the name then click the search button, when I click on the button it does not return the date specified from the textboxes. it just displays all the record for the name that was selected.


This is what I wrote in my querry under StartDate criteria section:

between [forms]![datesearch]![StartDate] and [forms]![datesearch]![EndDate]

I'm not sure why this is not filtering the proper dates.
 

Brianwarnock

Retired
Local time
Today, 01:50
Joined
Jun 2, 2003
Messages
12,701
Just realised that you have 2 date fields,
Under startdate<= yourformfield
Under enddate >= yourformfield

Brian
 

MStef

Registered User.
Local time
Today, 01:50
Joined
Oct 28, 2004
Messages
2,251
Look at "DemoStartDateEndDateA20022003.mdb" (attachment, zip).
Look at Table, Query, Form.
Open Form1 and try.
Adapt it in your mdb.
 

Attachments

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top Bottom