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

x
?
Solved

Access query that uses a dynamically created date

Posted on 2008-06-26
2
Medium Priority
?
228 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
[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
2 Comments
 
LVL 18

Accepted Solution

by:
jmoss111 earned 1000 total points
ID: 21875094
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
ID: 31470968
I should have just gone ahead and tried to do that myself...that was my initial inclination.  Thanks!!
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
This post looks at MongoDB and MySQL, and covers high-level MongoDB strengths, weaknesses, features, and uses from the perspective of an SQL user.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

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