What does " < #" do? (1 Viewer)

Sketchin

Registered User.
Local time
Today, 07:59
Joined
Dec 20, 2011
Messages
575
I have a criteria in a DCount that says "MinOfDateout < #" and have no idea what < # is doing.

MinOfDateout is a field in a query.

The entire string looks like this:

Code:
UNICompaniesSupportedCumulativeAB = Nz(ECount("[MaxOfContactID]", "QryCumulativeMetricsNew", "[State/Province] = 14 AND [CompanySizeID] = 5" & " and MinOfDateout < #" & [Forms]![frmdashboard]![txtDateTo] & "#", True))
 

plog

Banishment Pending
Local time
Today, 09:59
Joined
May 11, 2011
Messages
11,646
You actually have an ECount call--perhaps its a typo. The < # are two different symbols, doing two different things:

< is the less than comparison operator.
# is the date escape character, it lets the computer know that what comes next is a date

Lastly, you don't need a NZ around a DCount--its going to return something therefore the NZ will never trigger.
 

Sketchin

Registered User.
Local time
Today, 07:59
Joined
Dec 20, 2011
Messages
575
Geez, I am out of practice.... Now I see how # is being used, it is saying that everything between the #'s is a date.

#" & [Forms]![frmdashboard]![txtDateTo] & "#

It's been a VERY long time since I have actively developed! Thanks for the help.
 

Users who are viewing this thread

Top Bottom