Solved

DCount not working?

Posted on 2011-03-03
5
499 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

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…
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…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

707 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

18 Experts available now in Live!

Get 1:1 Help Now