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?
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?