Solved

Correct syntax for DCOUNT expression with duel boolean conditions

Posted on 2009-04-11
2
551 Views
Last Modified: 2013-11-28
Hi,
I've got an unbound textbox in a form with a dcount expression in it as the control source.
The result I want is a count if 2 different yes/no fields are both ticked.
The control source expression is as follows, but it keeps giving an error message in the textbox. Also, the textbox flashes (like it is stuck in a loop).
As you might guess, I'm a bit new to this (I've been looking on the net, but can't find a similar example to guide me).
field1 is text, field2 and filed3 are logical (yes/no) fields
Hope you can help.
Bill

=DCount("[field1]","table1","[field2]=True and [field3]=True")

Open in new window

0
Comment
Question by:Billw1100
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 77

Accepted Solution

by:
peter57r earned 50 total points
ID: 24121820
Looks fine to me.
Make sure everything is spelled correctly
0
 

Author Closing Comment

by:Billw1100
ID: 31569151
I feel like an idiot. When I first read your answer, I thought "of course my spelling is correct - its the first thing I checked". But I was wrong of course. I had mixed up the control's Name and Control Source for one of the fields. Thanks for your help. It works correctly now.
Bill
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question