Help with Dlookup Multiple Criteria

Auburnsp

New member
Local time
Today, 05:13
Joined
May 8, 2012
Messages
7
I am trying to use dlookup on a subform to find a score (from a table) based on 3 criteria - age, rank and total.

Here is my attempt but it looks up the wrong data from the table:

=DLookUp("[SS]","[tblWAIS]","[Raw]='" & [Total] & "'" And "[Age]='" & [Age5] & "'" And "[Rank]='" & [Rank2] & "'")

Rank2 and Age5 are unbound fields that are also lookup fields - getting their data from the master form.

The fields in the lookup table are all text fields.

What am I doing wrong? I have tried switching around the criteria order but no matter what I try get the wrong score.

Can anyone help?
 
Take out the double quotes on either side of each And.
 
Worked like a charm. Thank you!
 

Users who are viewing this thread

Back
Top Bottom