I am trying to find the most efficient way to validate the data returned from a DLookup, DCount or DSum. Although DLookup is easy, since it is an empty string..,
Is the best method simply the following ...
Is there a more efficient way to validate the DCount and DSum?
David Pimental
(US, Oh)
Is the best method simply the following ...
Code:
if DCount("[sales]","orders","[city] = 'Boston'") > 0 then
Msgbox "The Count of Orders for Boston is " & DCount("[sales]","orders","[city] = 'Boston'")
end if
if DSum("[sales]","orders","[city] = 'Boston'") > 0 then
MsgBox "The Total Sales for Boston is " & DSum("[sales]","orders","[city] = 'Boston'")
end if
Is there a more efficient way to validate the DCount and DSum?
David Pimental
(US, Oh)