G
Guest
I have what I think should be a really simple query.
I am trying to create a 'all customers not contacted in X days' query where
x is a user input. So, to simplify the output, I have the customer id, and
the contact date, and an expression (calculated field) that is (todays date
minus the date of contact). As mentioned, the criteria for the todays date
minus the date of contact is a user input, eg: >=[enter days].
When the user enters a value lower than the lowest value, all works fine,
but when the user enters a value greater than the lowest value, the recordset
doesn't produce any results where the calculated field is greater than 100?
That is, where a customer hasn;t been contacted in 101 days, it doesn't
appear in the resulting recordset even f the variable input is 50 days.
Really weird. All the customer contacted up to 99 days seems to work fine.
Any ideas?
When I create this exact same query where the variable criteria is >= [enter
date], wher the date is the date of last contact, it works fine, it finds all
the records after the user input date, including those contacted over 100
days ago.
This is very confusing and sooooooo frustrating for something that should be
so simple.
SQL below.
SELECT CUSTOMER_CONTACT_NOTES.conta_date, CUSTOMER.cust_id,
Date()-[conta_date] AS Expr1
FROM CUSTOMER INNER JOIN CUSTOMER_CONTACT_NOTES ON CUSTOMER.cust_id =
CUSTOMER_CONTACT_NOTES.cust_id
WHERE (((Date()-[conta_date])>=[enter days]));
Any assistance is appreciaed.
I am trying to create a 'all customers not contacted in X days' query where
x is a user input. So, to simplify the output, I have the customer id, and
the contact date, and an expression (calculated field) that is (todays date
minus the date of contact). As mentioned, the criteria for the todays date
minus the date of contact is a user input, eg: >=[enter days].
When the user enters a value lower than the lowest value, all works fine,
but when the user enters a value greater than the lowest value, the recordset
doesn't produce any results where the calculated field is greater than 100?
That is, where a customer hasn;t been contacted in 101 days, it doesn't
appear in the resulting recordset even f the variable input is 50 days.
Really weird. All the customer contacted up to 99 days seems to work fine.
Any ideas?
When I create this exact same query where the variable criteria is >= [enter
date], wher the date is the date of last contact, it works fine, it finds all
the records after the user input date, including those contacted over 100
days ago.
This is very confusing and sooooooo frustrating for something that should be
so simple.
SQL below.
SELECT CUSTOMER_CONTACT_NOTES.conta_date, CUSTOMER.cust_id,
Date()-[conta_date] AS Expr1
FROM CUSTOMER INNER JOIN CUSTOMER_CONTACT_NOTES ON CUSTOMER.cust_id =
CUSTOMER_CONTACT_NOTES.cust_id
WHERE (((Date()-[conta_date])>=[enter days]));
Any assistance is appreciaed.