Solved

DCount not working?

Posted on 2011-03-03
5
502 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
  • 3
  • 2
5 Comments
 
LVL 74

Accepted Solution

by:
Jeffrey Coachman earned 25 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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

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…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

785 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