Solved

Correct syntax for DCOUNT expression with duel boolean conditions

Posted on 2009-04-11
2
481 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
2 Comments
 
LVL 77

Accepted Solution

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

Author Closing Comment

by:Billw1100
Comment Utility
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

744 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now