Eljefegeneo
Still trying to learn
- Local time
- Yesterday, 23:31
- Joined
- Jan 10, 2011
- Messages
- 899
I am having a problem combining the DCount function with & "And" [ControlName] either equal or not equal to something. I can get it to work with just the DCount, but when I combine it with the "And", all I get is the #Name? error:
=IIf(DCount("[ClientLangID]","qryLanguages","[ClientID] = " & [ClientID])=1 And [Language]="English","No",IIf(DCount("[ClientLangID]","qryLanguages","[ClientID] = " & [ClientID])>1 And [Language]<>"English","Yes","Both"))
Please see the attached sample DB.
I would like to have a calculated field so that:
1. If there is only one language and it is "English", the answer would be "no"
2. If there is one or more language and one of them is not "English", the answer would be "yes"
3. Else "both"
=IIf(DCount("[ClientLangID]","qryLanguages","[ClientID] = " & [ClientID])=1 And [Language]="English","No",IIf(DCount("[ClientLangID]","qryLanguages","[ClientID] = " & [ClientID])>1 And [Language]<>"English","Yes","Both"))
Please see the attached sample DB.
I would like to have a calculated field so that:
1. If there is only one language and it is "English", the answer would be "no"
2. If there is one or more language and one of them is not "English", the answer would be "yes"
3. Else "both"