Put all the criteria into a string variable and debug print it BEFORE using it in the SQL.
Hi Gasman, thanks for the help.....Put all the criteria into a string variable and debug print it BEFORE using it in the SQL.
The VFirstDate has a valid date in, there are definitely Appointments in the tbl_Appointments that match the criteria,
I'm not sure how to test the DateValue(ApptStart) (which is definitely a field in the Appointments table) before the recordset has been selected.....
sorry I'm not so good at this am I!
I have taken away the Employee and calendertypeID so as just to test the dates first..