By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,940 Members | 611 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,940 IT Pros & Developers. It's quick & easy.

DCount and DLookup with Date

P: n/a
Hi All,

I am trying to use the DCount and DLookup functions with the WHERE
expression set to: "DateToDo <= #" & Date & "#" to display all items
with their DateToDo set to the current date or earlier than the current
date. However, it is still returning 0 as the number counted? Is there
some other way to compare records with dates to the system date for
counting?

Thanks in Advance!

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
You should be able to use:
"[DateToDo] <= Date()"

If there is a time component in the DateToDo, try:
"[DateToDo] < Date() + 1"

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Alec" <alec_e_christie at hotmail dot com> wrote in message
news:41**********************@news.newsgroups.ws.. .

I am trying to use the DCount and DLookup functions with the WHERE
expression set to: "DateToDo <= #" & Date & "#" to display all items
with their DateToDo set to the current date or earlier than the current
date. However, it is still returning 0 as the number counted? Is there
some other way to compare records with dates to the system date for
counting?

Nov 13 '05 #2

P: n/a
Are you sure that your [DateToDo] field/variable is dimmed as date?
Fred Zuckerman
"Alec" <alec_e_christie at hotmail dot com> wrote in message
news:41**********************@news.newsgroups.ws.. .
Hi All,

I am trying to use the DCount and DLookup functions with the WHERE
expression set to: "DateToDo <= #" & Date & "#" to display all items
with their DateToDo set to the current date or earlier than the current
date. However, it is still returning 0 as the number counted? Is there
some other way to compare records with dates to the system date for
counting?

Thanks in Advance!

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 13 '05 #3

P: n/a
Thats wonderful, worked a treat.

Thanks for the help!
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.