Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Correct syntax for DCOUNT expression with duel boolean conditions

Posted on 2009-04-11
2
Medium Priority
?
593 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 200 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

Does Your Cloud Backup Use Blockchain Technology?

Blockchain technology has already revolutionized finance thanks to Bitcoin. Now it's disrupting other areas, including the realm of data protection. Learn how blockchain is now being used to authenticate backup files and keep them safe from hackers.

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
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 …
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

660 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