• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 510
  • Last Modified:

DCount not working?

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
Anthony Berenguel
Asked:
Anthony Berenguel
  • 3
  • 2
1 Solution
 
Jeffrey CoachmanCommented:
Try these perhaps:

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

= DCount("*", "qry_ProcFormS02_Combobox_Values", "IsNull([RecID]")
0
 
Jeffrey CoachmanCommented:
sorry:
or:
= DCount("*", "qry_ProcFormS02_Combobox_Values", "IsNull([RecID])")
0
 
Anthony BerenguelAuthor Commented:
Thanks, boaq2000. I also just  figured out that i = DCount("*", "qry_ProcFormS02_Combobox_Values", "[RecID] is null") works as well.

0
 
Jeffrey CoachmanCommented:
OK

But try to us the caps, this is how that Autocorrect will convert it to in many cases
0
 
Anthony BerenguelAuthor Commented:
will do. Thanks! And special thanks for the quick help!
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now