DLookup Problem



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.


.



Relevant Pages

  • Re: DLookup Problem
    ... SkillID ... Probably one of the many having fun with Dlookup! ... My query works fine if fed with say a parameter with just one staff member ... Which is the base for the query, plus another master table which Dlookup ...
    (microsoft.public.access.queries)
  • Re: Updatable Query (trying to edit records)
    ... the query so some fields are lookup fields. ... The only reason the Staff table is ... CABudgetHrs to arrive at the budgeted $ for that assignment. ... two tables ClientAssignment and Staff. ...
    (microsoft.public.access.queries)
  • Re: Employee resigned then claimed to be fired
    ... members of staff who witnessed the incident, ... witness statements - one saying that see didn't hear exactly what was ... Stylists generally do try and take those clients with them. ...
    (uk.legal)
  • Psychiatry was inept, report says
    ... inmates by a patient, one David Denge, at the hospital last month. ... A report released by a probe committee formed to investigate the ... members of staff implicated in the incident.The Minister for Health ...
    (sci.med.psychobiology)
  • Re: The yanks are naive!
    ... are you suggesting we don't have a Parliament? ... its elected members are drawn from the independently wealthy classes ... expecting too much. ... I know an office around Westminster where the staff get ...
    (uk.local.kent)