Hi
I have a query which should do the following..
Bring up all records from customer table that
datelastvisited field is not during the last 3 months
or is null
AND has a region matching a user input value
OR
in a customercalls table with a one to many relationship on customerid
if nextcalldate is within the lst 3 months
or is null
i thought i had it working but its not..
below is the query that i thought was working before I tried adding the null criteria..
SELECT customers.*, customers.CustomerLastVisitDate, CustomerCalls.CustomerCallDateNext FROM customers INNER JOIN CustomerCalls ON customers.CustomerID = CustomerCalls.CustomerID WHERE ((([customers.customerregion])='" & Me.cboRegion & "') AND ([customers.CustomerLastVisitDate] Not Between Date() And DateAdd('m',-3,Date()))) AND ((CustomerCalls.CustomerCallDateNext) Between Date() And DateAdd('m',-3,Date())) OR (([customercalls.customercalldatenext])=Date());
can anyone help me?
I seem to have lsot the plot..
thanks
mat