C
Col
Hi all,
Probably one of the many having fun with Dlookup!
Wonder if anyone can help.
Trying to produce some data on whether certain members of staff have the
correct training for a certain duty based on up to five different
qualifiers.
My query works fine if fed with say a parameter with just one staff member
but when additional staff members are added the Dlookup formula I wrote goes
wrong.
I have five fields in a table named;
Skill01
Skill02
Skill03
Skill04
Skill05
Which is the base for the query, plus another master table which Dlookup
refers listing all training done and the name of the skill in the field
[Skill].
The formula is
SK1 Look: IIf([Skill 01] Is Null,"N/A",IIf([Skill
01]=DLookUp("[Skill]","Training","[Skill] = '" & [Skill 01] &
"'"),"Yes","No"))
I'm thinking that Dlookup can't handle multiple instances of the same lookup
criteria and it just returns the first one it sees.
If so, would there be another way of producing the data, for example if I
have a list of staff to query, is it possible to run the query just on the
first row (i.e. staff name) and then again on the second etc, all the time
appending results into another table?
Thank you for any help.
Colin.
Probably one of the many having fun with Dlookup!
Wonder if anyone can help.
Trying to produce some data on whether certain members of staff have the
correct training for a certain duty based on up to five different
qualifiers.
My query works fine if fed with say a parameter with just one staff member
but when additional staff members are added the Dlookup formula I wrote goes
wrong.
I have five fields in a table named;
Skill01
Skill02
Skill03
Skill04
Skill05
Which is the base for the query, plus another master table which Dlookup
refers listing all training done and the name of the skill in the field
[Skill].
The formula is
SK1 Look: IIf([Skill 01] Is Null,"N/A",IIf([Skill
01]=DLookUp("[Skill]","Training","[Skill] = '" & [Skill 01] &
"'"),"Yes","No"))
I'm thinking that Dlookup can't handle multiple instances of the same lookup
criteria and it just returns the first one it sees.
If so, would there be another way of producing the data, for example if I
have a list of staff to query, is it possible to run the query just on the
first row (i.e. staff name) and then again on the second etc, all the time
appending results into another table?
Thank you for any help.
Colin.