[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 488
  • Last Modified:

DCount function in a Macro Condition for MS-Access

The expression below fires an action when "There are more than 35 entries in the OrderID field of the Orders table."
Code:

DCount("[OrderID]", "Orders")>35

I'm looking for a condition that would fire when "There are more than 35 entries in OrderID field that are NUll for the Orders table."

Any suggestions would be greatly appreciated! Thanks!
0
KP_SoCal
Asked:
KP_SoCal
  • 2
  • 2
2 Solutions
 
TracyVBA DeveloperCommented:
Try this:
DCount([OrderID], [Orders],[OrderID]=Null)>35
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
You  mean this?

DCount([OrderID], [Orders],IsNull([OrderID]) )>35

mx
0
 
KP_SoCalAuthor Commented:
Thanks guys for the quick response.  Both of you were close.  The expression below is the one that ended up giving me my needed result.

DCount("[OrderID]","Orders",IsNull("[OrderID]"))>35
0
 
KP_SoCalAuthor Commented:
Both solutions offered where very close to what I needed.  From their suggestions, I was able to figure out what I needed.
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
"Both solutions offered where very close to what I needed. From their suggestions, I was able to figure out what I needed."

Thx.

0

Featured Post

[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

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