DCount Function in Macro Condition

KP_SoCal

Registered User.
Local time
Today, 12:16
Joined
Dec 4, 2009
Messages
39
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!
 
Try

DCount("[OrderID]", "Orders", "OrderID Is Null")>35
 
Wierd, I tried is both ways and am unable to make it work. If the OrderID has a value, if I specify it in my criteria (eg: "OrderID = '501'"), it works. But it's not working for "OrderID Is Null" or "IsNull("OrderID). Any ideas???

Code:
DCount("[OrderID]","tblNeedsLTS",IsNull("OrderID"))>35
 
Last edited:
As a workaround, I set the default value of the field to be ' ', and it worked.

DCount("[OrderID]","Orders,"OrderID = ' '")>0

:cool:
 

Users who are viewing this thread

Back
Top Bottom