Solved

Access query that uses a dynamically created date

Posted on 2008-06-26
2
211 Views
Last Modified: 2013-11-27
I apologize if the question title wasn't appropriately named, but it was hard to try to come up with the words.

I want to create an Access query that deletes any record in a table that is older than 30 days ago from the current date.

I'm familiar with writing SQL statements, but not one that would use a variable type element as with this example.

Is there a way to do this in Access?
0
Comment
Question by:zrancidr
2 Comments
 
LVL 18

Accepted Solution

by:
jmoss111 earned 250 total points
Comment Utility
If you have some date in the table that contains the reference date then "DELETE * FROM MyTable WHERE MyDate < Date() - 30;"
0
 

Author Closing Comment

by:zrancidr
Comment Utility
I should have just gone ahead and tried to do that myself...that was my initial inclination.  Thanks!!
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
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…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

743 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now