Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Retrieving records from ms access for specific dates

Posted on 2009-05-04
1
Medium Priority
?
195 Views
Last Modified: 2012-05-06
Given an MD Access DB with records containing a date, how can retrieve the records for a specific date?  I know how to use the dateadd function to pull the records using the (-) days approach.  

I want to pull records for the past 24 days, one day at a time.  How can I do that?

for rw as integer =24 to 0 step -1
 sql="select * from history where type='cycle' and cycle_date = '" & ???????
next

Any ideas?
0
Comment
Question by:ddepuemd
[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
1 Comment
 

Accepted Solution

by:
ddepuemd earned 0 total points
ID: 24294963
Nevermind, I found my answer by doing this:

sql = "select * from cycle_history where cycle_type='cycle' and job_number='" & jobno & "' and cycle_time >= dateadd(""d"",0,#" & Now.Date.AddDays(-dy) & "#) and cycle_time < dateadd(""d"",0,#" & Now.Date.AddDays(-dy + 1) & "#) order by cycle_time desc"
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

Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

636 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