stevekos07
Registered User.
- Local time
- Today, 08:20
- Joined
- Jul 26, 2015
- Messages
- 174
Hi all. I have read several posts covering this issue but I'm still stumped as to how to structure the syntax for a DCount function as the source for a text box on a form.
I have the following expression on an existing text box which works jus fine:
=DCount("[ClientID]","qryClientDetailsExtendedBaseCallSheets","[BaseName] = '" & [cboBaseName] & "'")
This counts the number of clients who are applicable to a particular base, which is dependent on the selection in the combobox.
I now want to add a second criteria which counts a result which is a text string of Yes. This is a text string not the result of a Yes/No selection box. It is derived from an expression in a query which is based on several yes/no option boxes as an IIF expression - "if this and this and this or that then "Yes", otherwise "No".
I have tried the following with an error result:
=DCount("[ClientID]","qryClientDetailsExtendedBaseCallSheets","[BaseName] = '" & [cboBaseName] & "'" And [CallToday] = 'Yes'")
I know I have a syntax error somewhere here but I am confused as to what to change. I have tried a few different syntax structures but I'm exasperated!
Any assistance gratefully received.
I have the following expression on an existing text box which works jus fine:
=DCount("[ClientID]","qryClientDetailsExtendedBaseCallSheets","[BaseName] = '" & [cboBaseName] & "'")
This counts the number of clients who are applicable to a particular base, which is dependent on the selection in the combobox.
I now want to add a second criteria which counts a result which is a text string of Yes. This is a text string not the result of a Yes/No selection box. It is derived from an expression in a query which is based on several yes/no option boxes as an IIF expression - "if this and this and this or that then "Yes", otherwise "No".
I have tried the following with an error result:
=DCount("[ClientID]","qryClientDetailsExtendedBaseCallSheets","[BaseName] = '" & [cboBaseName] & "'" And [CallToday] = 'Yes'")
I know I have a syntax error somewhere here but I am confused as to what to change. I have tried a few different syntax structures but I'm exasperated!
Any assistance gratefully received.