Solved

Correct syntax for DCOUNT expression with duel boolean conditions

Posted on 2009-04-11
2
493 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
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…

929 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

12 Experts available now in Live!

Get 1:1 Help Now