473,326 Members | 2,175 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Dcount with a boolean field

MGrowneyARSI
Hello I'm trying to do a dcount in a Query where a boolean, Yes/No field is set to true but I keep geting the msg. Data type mismatch in critiria expression
here in the count
If DCount("[ID]", "Survey_Query", "[Do_Survey] = 'True') < DLookup("[Min_Survey]", "Corporate") Then
I have tryed
'" & "True" & "'" ""True""" '" & True & "'" as well all returning the same issue I must be missing something
TIA
Sep 13 '07 #1
2 6457
Got it it was ] = -1") that worked in the end :D And I thought True would work better oh well.
Sep 13 '07 #2
MMcCarthy
14,534 Expert Mod 8TB
Got it it was ] = -1") that worked in the end :D And I thought True would work better oh well.

This would have worked. True is not a string value so you don't enclose it in single quotes.

If DCount("[ID]", "Survey_Query", "[Do_Survey] = True") < DLookup("[Min_Survey]", "Corporate") Then
Sep 14 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: jdph40 | last post by:
I posted this problem previously and received excellent help from Wayne Morgan. However, I still have an unanswered question. My form (frmVacationWeeks) is opened from the OnClick event of a...
1
by: Megan | last post by:
Hi Everybody- I've been reading some of the posts about DCOUNT, and I haven't yet found an answer; so, I'm posting this question. I have a report that I'm trying to use DCOUNT on to compute...
6
by: Mike Conklin | last post by:
This one really has me going. Probably something silly. I'm using dcount for a report to determine the number of different types of tests proctored in a semester. My report is based on a...
11
by: N J | last post by:
Hi, I was given this code by a member on here but I am still stuck...I want to be able to see if there is other orders in the table based on the email address. But I keep getting #Name? what does...
7
by: kaosyeti | last post by:
hey.. i have a control in a report that needs to count the records from a table that match the parameters that the user selects when creating the report. the report is created with...
2
by: Kaspa | last post by:
Hello I am trying to create dcount field but is not working I have tried every way possible and I can't get it to work. here is my code: =Dcount("","qryTotalscratched"," in (6,7,8,9) and ...
7
by: Michael R | last post by:
Good afternoon. I'm stucked in composing the syntax for DCount expression in a select query. The query qryCustomers has CustomerID field, the DCount function uses tblLoans with LoanDate and Id fields...
4
by: ashitaka65 | last post by:
hey, i'm writting a database and in my report am tryin to have dcounts count some diffrent fields i would like to know if there is a way to have your dcount skip or not count a field or if there is...
16
by: zeusspandex | last post by:
Hello everyone I have been useing Access for a while now and have attempted useing DCount a number of times but with varying results. I am currently trying to have a field in a form that will...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.