473,394 Members | 1,866 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

DCount and DLookup with Date

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
3 7581
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Classified | last post by:
Hey There, Have a problem, hopefully someone out here can lend me a hand. Working on an appointment databases, haven't used VBA in ages and I am find a lot of rust everywhere. What I'm...
1
by: Megan | last post by:
Hi Everybody- I've been reading some of the posts about DCOUNT, and I haven't yet found an answer; so, I'm posting this question. I have a report that I'm trying to use DCOUNT on to compute...
11
by: WindAndWaves | last post by:
Hi everyone, I hope I will not get banned for asking toooo many questions. I am just really excited to have this platform ;-) I have the following function: Function IsProperty(pptname) as...
6
by: Mike Conklin | last post by:
This one really has me going. Probably something silly. I'm using dcount for a report to determine the number of different types of tests proctored in a semester. My report is based on a...
1
by: kaosyeti | last post by:
so i'm new to access but i've done a lot in the last 3 months since i looked at it for the first time back then. so when i finished my first db for my job, i cut it close to the end of the year...
7
by: MLH | last post by:
?dcount("","qryOwnrsDueITSwMissingAddr") when run in the immediate window return a number greater than the number of rows that display when the saved query is run - opening in the database window?...
1
by: Sheldon Mopes | last post by:
I have read a few articles that state that a multi-user app over a network will run faster if DSum & DCount functions are replaced with SQL statements replicating the functions. As I am a novice to...
2
by: Isaac | last post by:
I am still working on my database of work performance for the company I work for. I have a form (frmtblOccurrences) based on a table (tblOccurrences). I also have tblAgent that contains personal...
3
by: ringer | last post by:
I am trying to add a functionality into a db I use for my checkbook that will help me plan for and save money for future large expenses. Into a table called tblFutureTransactions I want to enter...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.