View Full Version : Start/End Dates, & what's in between 'em


Uverga
10-08-2001, 08:51 AM
My table has a StartDate and EndDate along with meeting information.

Start End Meeting
10/8/01 10/11/01 Brakes Workshop
10/9/01 10/9/01 Transmission Workshop

I would like to report the meeting information for one week at a time.

10/8/01 Brakes Workshop
10/9/01 Brakes Workshop
10/9/01 Transmission Workshop
10/10/01 Brakes Workshop
10/11/01 Brakes Workshop

Problem: How can Access 2000 list information for dates that are IN BETWEEN the StartDate and EndDate? (example: 10/9/01 & 10/10/01 Brakes Workshop)

Thank you for your help.

Rich
10-08-2001, 11:14 AM
You'll have to create a custom function to generate the dates since they aren't stored anywhwere in your db.
HTH

Uverga
10-18-2001, 06:41 AM
What would a custom function for this problem look like?

PhilipEwen
10-19-2001, 03:24 AM
If you run a query, looking for all info.

In my example i am looking for all flight details between txt_date and txt_dateto - which are 2 fields on my form - so i enter the dates and it finds all the info between these dates (for flights belonging to the resort )

SELECT [flights].[flightid], [flights].[departairport], [flights].[arriveairport], [flights].[traveldate], [flights].[duration], [flights].[flightname], [flights].[price], [flights].[flightsresortid]
FROM flights
WHERE ((([flights].[traveldate]) Between [Forms]![flights]![txt_date] And [Forms]![flights]![txt_dateto]) And (([flights].[flightsresortid])=[flightsresortid]))
ORDER BY [flights].[traveldate];

So in your query, drag all the required info, then in the criteria for the date, type
BETWEEN [Forms]![formname]![datefield1] AND [Forms]![formname]![datefield2]

that should do it !!

HTH