Dlookup not working

G

Guest

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
 
G

Guest

Try;

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

TonyT..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top