Solved

System Date

Posted on 2000-03-30
4
136 Views
Last Modified: 2010-05-02
What is the sintax that I can use to compare a Date Column from access to the System Date ? Like this :

adodc1.recordset.open "select * from table where field1 < date"

When I use two date columns no problems.

Thanks in advance for any help
0
Comment
Question by:tomcruisew
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 1

Expert Comment

by:vbWayne
ID: 2669556
MSDN:  datediff function
0
 
LVL 20

Expert Comment

by:hes
ID: 2669704
Dim CurrentDate
CurrentDate = Format(Now,"mm/dd/yyyy")

adodc1.recordset.open "select * from table where field1 < #" & CurrentDate & "#"

0
 
LVL 4

Accepted Solution

by:
wesleystewart earned 15 total points
ID: 2670185
Date() will return the current system date:

adodc1.recordset.open "select * from table where field1 < #" & Date() & "#"

Wes
0
 
LVL 9

Expert Comment

by:cymbolic
ID: 2670382
Be aware that datetime fields will assume you mean just after midnight on the day you compare.  So if you want to include items on that day, you need to say something like #12/31/99 23:59# or just say <#1/1/00#
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question