Query Date from Between Two Dates in a Table (1 Viewer)

Pienuts

Registered User.
Local time
Yesterday, 17:40
Joined
May 2, 2014
Messages
106
Hi all!
I need to create a query and I’m not 100% certain how to make it.

I have a query that shows the latest construction date for a Site and a table with two types (Type = 1 and Type = 2) of reclamation criteria, and a start date and end date for each criteria.
I need a query to tell me the applicable Type 1 and Type 2 reclamation criteria for each site. The start and end dates are such that there can only be one applicable reclamation criteria for each type per Site.

Does anyone have an idea of how I can go about doing this?
Thanks for your assistance!
 

Ranman256

Well-known member
Local time
Yesterday, 19:40
Joined
Apr 9, 2015
Messages
4,337
not exactly sure what you want , but a query would read a date off a form,

select * from table where forms!frmRpt!txtDate between [startDate] and [EndDate]
 

Pienuts

Registered User.
Local time
Yesterday, 17:40
Joined
May 2, 2014
Messages
106
Thanks for relplying!
I am not using a form; I'll reword for clarity. But thanks of reminding me of the between function - that's definitely going to be part of the answer.

My setup looks like this:

qrySiteLatestConstructDate
SteKey - pk for tblSite
MaxConstructionDate - Date

tblRecCriteria
RecCritID - pk
RecCritBody - integer , 1 or 2 (this is the Type I was talking about earlier)
RecCritStartDate - Date,
RecCritEndDate - date

I want a query to look up the applicable RecCritBody=1 and RecCritBody=2 for each site, where the MaxConstructionDate is between the start and end dates.

Is that more clear?
 

Pienuts

Registered User.
Local time
Yesterday, 17:40
Joined
May 2, 2014
Messages
106
Okay, for some reason I always come up with the answer shortly after posting on this forum!
I've figured it out, and I used the Between function, so thanks to you, Ranman!
 

Users who are viewing this thread

Top Bottom