dmarsh16946
Technical User
Have an annual subscription database with various dates
Join Date - when a subscription is started; defines the RenewalMonth
for later years :-
LastPaidDate - from which a MonthPaid is derived using DatePart.
A query then calculates
LastRenewedDate - if the payment is late, the month of LastPaidDate is extracted using DatePart and the difference in months applied to LastPaidDate to give this LastRenewedDate
CurrentExpiryDate - a year added to LastRenewedDate using DateAdd
Further queries include these calculated dates and month differences, and they look like normal dates and numbers.
But if I try to use criteria on them, say
>0 for overdue month
<Date() for years
I get 'Data type mismatch in criteria expression' errors. How can I avoid these?
Looking at the Format properties of say the date fields in the queries, the drop-down is blank, so it appears that Access isn't seeing them as true dates. Similarly the month numbers aren't seen as true numbers. Have tried adding Val to the numbers but still no joy.