Delete Records that are > 90 Days

N

NFL

I have a database that I would like to delete all records that are greater
than 90 days old in my table. The condition would be looking at the
"InitialContact" field in my table and the data type is set to "date" format.
I'm not sure how to approach this and I was thinking that I could create a
query to identify records that are over 90 days and then where do I go from
there?

Thank you,
 
D

dymondjack

I know I left a reply already but it isn't showing as of yet...


Make a SELECT query to pull the records you want... verify them

Change SELECT to DELETE and run the query to delete the records.

Use CurrentDB.Execute or DoCmd.RunSQL to run the query from code.

hth

--
Jack Leach
www.tristatemachine.com

- "Success is the ability to go from one failure to another with no loss of
enthusiasm." - Sir Winston Churchill
 
N

NFL

I like both of those options. I tried your VBA example and a dialog box
prompts for input with the name "InitialContact". How do I get rid of that?
InitialContact is the field I want to check and see if there are any records
older than 90 days.

Thank you!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top