I have a table for water monitoring sites, each site has a SiteNo (site number) field and in another table each site has details of a number of samples taken at that site, including the date taken, What I need is a query which gives me details of the sites with the first and last date on which a sample was taken for each site. The following code gets me the earlies sample in the sample table, but what do I put in the third part of the DMin to get it for each site?
[CODE=vb]EarliestSample: DMin("[Date]","tblSampl e")[/CODE]
It's got to be something like
[CODE=vb]"SiteNo = 'something'"[/CODE]
but what? Should I compare it to something else in the query
[CODE=vb]"SiteNo = SiteNo"[/CODE]
or something on the report where the query is the Control Source?
Thanks in advance, and
Go Mary, Go (9K!)
(Edit: Actually, everybody in the top 10 with the exception of JosAH and possibly r0 (and pbmods who hase just clocked one) are in the final stages of the next K. Way to go troops!)
Jim
[CODE=vb]EarliestSample: DMin("[Date]","tblSampl e")[/CODE]
It's got to be something like
[CODE=vb]"SiteNo = 'something'"[/CODE]
but what? Should I compare it to something else in the query
[CODE=vb]"SiteNo = SiteNo"[/CODE]
or something on the report where the query is the Control Source?
Thanks in advance, and
Go Mary, Go (9K!)
(Edit: Actually, everybody in the top 10 with the exception of JosAH and possibly r0 (and pbmods who hase just clocked one) are in the final stages of the next K. Way to go troops!)
Jim
Comment