Hey everyone -
I'm working with a stormwater facility management database (MS Access 2000 - we're a small town government) and I'm trying to create a query that will show me records where:
InspRequiredOn (date when the next inspection is) is < the current date
I think that I want to use Max(InspRequiredOn) < Date() (or whatever the SQL equivalent is for returning the current date) as my argument, but I am unsure how to implement this. I have already created a query that returns those properties which have upcoming inspections:
If I need to post any more information, please let me know and I will be happy to oblige!
Appreciate everyone's help in advance!
- Stephen Belyea
I'm working with a stormwater facility management database (MS Access 2000 - we're a small town government) and I'm trying to create a query that will show me records where:
InspRequiredOn (date when the next inspection is) is < the current date
I think that I want to use Max(InspRequiredOn) < Date() (or whatever the SQL equivalent is for returning the current date) as my argument, but I am unsure how to implement this. I have already created a query that returns those properties which have upcoming inspections:
Code:
SELECT [tblOwner].[OwnersBusiness], [InspRequiredOn]+(([PropInspInterval]*365)+1) AS Expr1, [tblOwner].[AutoIDOwner], [tblOwner].[OwnersFirstName], [tblOwner].[OwnersLastName], [tblOwner].[OwnersStreetAdd], [tblOwner].[OwnersCity], [tblOwner].[OwnersState], [tblOwner].[OwnersZipCode], [tblOwner].[OwnersPhoneNumber], [tblOwner].[OwnersEmail], [tblOwner].[MntAgrSigned], [tblOwner].[MntAgrDate], [tblOwner].[MntAgrLoc], [tblOwner].[OwnerNotes]
FROM (tblOwner INNER JOIN tblProperty ON [tblOwner].[AutoIDOwner]=[tblProperty].[AutoIDOwner]) INNER JOIN tblInspection ON [tblProperty].[AutoIDProperty]=[tblInspection].[AutoIDProperty]
WHERE ((([InspRequiredOn]+(([PropInspInterval]*365)+1))>(Date()-1)))
ORDER BY [InspRequiredOn]+(([PropInspInterval]*365)+1);
If I need to post any more information, please let me know and I will be happy to oblige!
Appreciate everyone's help in advance!
- Stephen Belyea