Delete all viewed records

  • Thread starter Thread starter Lonnie
  • Start date Start date
L

Lonnie

I have created a form that displays a list of records
that I would like to delete in one click. I use a form
because I run some code that lets me save records to
another table if it was deleted and archive file.
Thanks for any help, Lonnie
 
I have created a form that displays a list of records
that I would like to delete in one click. I use a form
because I run some code that lets me save records to
another table if it was deleted and archive file.
Thanks for any help, Lonnie

Access has no way of knowing what you've "viewed". Is the Form based
on a Query with criteria? If so you could create an Append and a
Delete query using the same criteria, and run them from the command
button.

In practice, unless you have DOCUMENTED AND SEVERE performance
problems, you're often better off keeping the records in the same
table; just add a yes/no field Active which is True for active records
and False for archived ones. Base your Form on a query selecting only
active records, and have a checkbox (or an update query) to mark
records as "archived".

John W. Vinson[MVP]
 

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

Back
Top