I kind of cheated and in the properties field checked yes for "Unique
Fields". I don't know if that caused another problem so that now another new
lease that I added with a commencement date that falls in the range doesn't
show up in the query. Either way, the SQL is below.
SELECT DISTINCTROW TblTenants.[Tenant Name], TblTenants.[Suite #],
TblTenants.Property, TblTenants.[Date of Lease], TblTenants.[Commencement
Date], TblTenants.[Renewal Date], TblTenants.[Expiration Date],
TblRentReview.Date
FROM (TblTenants INNER JOIN TblRent ON TblTenants.[Access ID#] =
TblRent.[Access ID]) INNER JOIN TblRentReview ON TblTenants.[Access ID#] =
TblRentReview.[Access ID]
WHERE (((TblTenants.[Commencement Date]) Between [From what date?] And [Thru
what date?])) OR (((TblTenants.[Renewal Date]) Between [From what date?] And
[Thru what date?])) OR (((TblRentReview.Date) Between [From what date?] And
[Thru what date?]));
KARL DEWEY said:
Post the SQL of your query. Open in design view, click on VIEW - SQL View,
highlight all, copy, and paste in a post.
--
KARL DEWEY
Build a little - Test a little
:
I have a report that I generated from a query. On the query, I need it to
pick up data if the dates in any of the three specific fields I give it are
between two certain dates. In the query, I put the criteria for the date in
one field and the other two fields they were in the "or" section. There were
several that came back multiple times. I hope that makes sense.