?
Solved

DCount not working?

Posted on 2011-03-03
5
Medium Priority
?
507 Views
Last Modified: 2013-11-27
Greetings,

i'm filtering a recordset, then counting how many records meet the criteria. I know the filter is working right but DCount is not working right. I'm sure that I'm overlooking something so could someone help me out. Thanks!
.Filter = "[RecID] = Null"
i = DCount("*", "qry_ProcFormS02_Combobox_Values", "[RecID] = Null")

Open in new window

0
Comment
Question by:Anthony Berenguel
[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
  • 3
  • 2
5 Comments
 
LVL 74

Accepted Solution

by:
Jeffrey Coachman earned 100 total points
ID: 35030162
Try these perhaps:

= DCount("*", "qry_ProcFormS02_Combobox_Values", "[RecID] Is Null")

= DCount("*", "qry_ProcFormS02_Combobox_Values", "IsNull([RecID]")
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 35030172
sorry:
or:
= DCount("*", "qry_ProcFormS02_Combobox_Values", "IsNull([RecID])")
0
 
LVL 10

Author Comment

by:Anthony Berenguel
ID: 35030210
Thanks, boaq2000. I also just  figured out that i = DCount("*", "qry_ProcFormS02_Combobox_Values", "[RecID] is null") works as well.

0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 35030488
OK

But try to us the caps, this is how that Autocorrect will convert it to in many cases
0
 
LVL 10

Author Comment

by:Anthony Berenguel
ID: 35030496
will do. Thanks! And special thanks for the quick help!
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
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…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

800 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