G
Guest
I am working with a database that has a number of related tables. The query
I am building only concerns two however. Entities and Last Seen. I have
created a form that asks for the date range with txtDateTo and txtDateFrom
text boxes. I wish to execute a query that retrieves all of the entities
that do not have any Last Seen linked records with a date that falls in the
range. So I want only the Entities that where not seen during a date range.
The Entities table has a one to many relationship with the Last Seen table.
I have tried a number of combinations including
SELECT Entities.* FROM Entities INNER JOIN LastSeen ON
Entities.[EntitiyKey]=LastSeen[EntityKey] WHERE LastSeen.Date >
Forms!FindNoCoverage!ToDate AND LastSeen.Date < Forms!FindNoCoverage!FromDate
It does not return an error, but by doing some research in the tables, there
are date gaps that I used to test the query and it did not return the
records. This is my first query messing with JOINS and finding records that
have no linked records that fall inside a date range.
Any help will be appreciated.
Cory
I am building only concerns two however. Entities and Last Seen. I have
created a form that asks for the date range with txtDateTo and txtDateFrom
text boxes. I wish to execute a query that retrieves all of the entities
that do not have any Last Seen linked records with a date that falls in the
range. So I want only the Entities that where not seen during a date range.
The Entities table has a one to many relationship with the Last Seen table.
I have tried a number of combinations including
SELECT Entities.* FROM Entities INNER JOIN LastSeen ON
Entities.[EntitiyKey]=LastSeen[EntityKey] WHERE LastSeen.Date >
Forms!FindNoCoverage!ToDate AND LastSeen.Date < Forms!FindNoCoverage!FromDate
It does not return an error, but by doing some research in the tables, there
are date gaps that I used to test the query and it did not return the
records. This is my first query messing with JOINS and finding records that
have no linked records that fall inside a date range.
Any help will be appreciated.
Cory