k11ngy said:
Thanks for help and it does work, thank you, can I ask another as people
here
chucked another scenario at me
It would invlove 3 criteria
1. If [A1] or [A2] are pass or exempt and [A3]=Pass or exempt ""Full
Award,
else ""
Hope you can help
Did you try to work it out yourself, based on the example already provided
and the help-file entry for the IIf function? We generally prefer to teach
people to fish. But ...
Let me restate the logic to see if I understand it:
IF (
([A1] = "Pass" OR [A1] = "Exempt")
OR
([A2] = "Pass" OR [A2] = "Exempt")
)
AND
([A3] = "Pass" OR [A3] = "Exempt")
THEN
return "Full Award"
ELSE
return ""
Is that correct? If so, I would first reorder the clauses so that the most
restrictive one comes first:
IF ([A3] = "Pass" OR [A3] = "Exempt")
AND
(
([A1] = "Pass" OR [A1] = "Exempt")
OR
([A2] = "Pass" OR [A2] = "Exempt")
)
THEN
return "Full Award"
ELSE
return ""
Then I'd reassemble them into proper sequence for an IIf expression:
=IIf([A3] = "Pass" OR [A3] = "Exempt") AND (([A1] = "Pass" OR [A1] =
"Exempt") OR ([A2] = "Pass" OR [A2] = "Exempt")), "Full Award", "")
That may be hard to read, since the line is very long and will have been
broken onto multiple lines arbitrarily by the newsreader. I'll restate it,
breaking onto multiple line at logical places:
=IIf([A3] = "Pass" OR [A3] = "Exempt")
AND (([A1] = "Pass" OR [A1] = "Exempt")
OR ([A2] = "Pass" OR [A2] = "Exempt")),
"Full Award",
"")
Note, though, that in most places you could write this, it must actually be
entered all on one line.
--
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)