Danielle17
Technical User
I posted a while back and got a couple different suggestions on what to do but they only solved part of the problem....I have to be able to pull up a report based on 2 things...One: is that the "Status" field must say "Registered Lead", Second: is that the "Date Entered" field must be dated 6 months ago or further back...So for instance the date must be 2/15/01, 6 months from today...Here is the code that I'm using in the query...
SELECT [Customer and Lead Listing].CustomerID, [Customer and Lead Listing].CompanyName, [Customer and Lead Listing].ContactName, [Customer and Lead Listing].City, [Customer and Lead Listing].State, [Customer and Lead Listing].Representative, [Customer and Lead Listing].Status, [Customer and Lead Listing].[Date Entered], [Customer and Lead Listing].CalHouse
FROM [Customer and Lead Listing]
WHERE ((([Customer and Lead Listing].Status)="Registered Lead" AND ((([Customer and Lead Listing].[Date Entered])=[Date Entered]) AND [Date Entered]<DateAdd("m",-6,Date())));
The results I'm getting are for the year before, The dates range from 3/5/00 to 12/22/00. If I take the "-" (before the 6) out then I get dates ranging from 3/5/00 to 8/6/01(the most recent)...I'm not sure why it won't take all of the records from 2/15/01 and before(which in this table would be 12/22/00)
I'm not sure what is wrong with it...Any suggestions would be greatly appreciated
SELECT [Customer and Lead Listing].CustomerID, [Customer and Lead Listing].CompanyName, [Customer and Lead Listing].ContactName, [Customer and Lead Listing].City, [Customer and Lead Listing].State, [Customer and Lead Listing].Representative, [Customer and Lead Listing].Status, [Customer and Lead Listing].[Date Entered], [Customer and Lead Listing].CalHouse
FROM [Customer and Lead Listing]
WHERE ((([Customer and Lead Listing].Status)="Registered Lead" AND ((([Customer and Lead Listing].[Date Entered])=[Date Entered]) AND [Date Entered]<DateAdd("m",-6,Date())));
The results I'm getting are for the year before, The dates range from 3/5/00 to 12/22/00. If I take the "-" (before the 6) out then I get dates ranging from 3/5/00 to 8/6/01(the most recent)...I'm not sure why it won't take all of the records from 2/15/01 and before(which in this table would be 12/22/00)
I'm not sure what is wrong with it...Any suggestions would be greatly appreciated