?
Solved

Query all End-Dates 2 days from now

Posted on 2005-05-10
4
Medium Priority
?
209 Views
Last Modified: 2010-05-02
I would like to setup a query for my access database that will return all records
that have an EndDate 2 days from the current date.


Thanks
tmurray22
0
Comment
Question by:tmurray22
  • 2
4 Comments
 
LVL 19

Expert Comment

by:Shauli
ID: 13972180
sqlString = "SELECT * FROM yourtable WHERE datefield = '" & Date + 2 & "';"

S
0
 
LVL 19

Expert Comment

by:Shauli
ID: 13972186
Sorry, access, not sql srever:

sqlString = "SELECT * FROM yourtable WHERE datefield = #" & Date + 2 & "#;"

S
0
 
LVL 7

Accepted Solution

by:
TitoBob earned 1400 total points
ID: 13972211
SELECT * FROM myTable WHERE DateDiff("d", Now, EndDate) = 2
0
 

Author Comment

by:tmurray22
ID: 13972545
Shuali, I got an error saying characters at end of sql statement. TitoBobs worked fine.
I now have another question but will post separately for more points.

Thanks
tmurray22
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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…
Suggested Courses
Course of the Month17 days, 10 hours left to enroll

831 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