Dlookup not working

A

Al

the following dlookup gives me error can anyone see any syntax error?

=DLookUp("[FollowupStatus]","tblFollowUp","[PatientID]='" & [PatientID] & "'
And [PatientContactDate] =" &
DMax("[PatientContactDate]","tblFollowUp","[PatientID]='" & [PatientID] &
"'"))

FollowupStatus and patientID are text fields. PatientContactDate is Date
field.
thanks
Al
 
T

TonyT

Try;

=DLookUp("[FollowupStatus]","tblFollowUp","[PatientID]='" & [PatientID] & "'
And [PatientContactDate] = #" &
DMax("[PatientContactDate]","tblFollowUp","[PatientID]='" & [PatientID] &
"'") & "#")

TonyT..
 
Top