What is appdate? What is aa? Could you change the select to command and place it in and other var:

Code:
Dim strSQL As String = Select APPOINTMENTTIME, REASONFORVISIT, PRIORITY, PATIENTID, DOCTORNUMBER FROM APPOINTMENTS WHERE To_Char(APPOINTMENTDATE,'DD/MM/YY') ='" & appdate & aa
and the do a debug.print and post the resulting value back here so we can look at it?