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]
 
Back
Top