Code to select all records on form

I have a search form which displays a set of records base upon a date range I enter. Once I have these filtered records I need some code that will select all the records.

Answer
Answer

I would use a delete query that executes when the button is pressed. 

Try acCmdSelectAllRecords

DoCmd.RunCommand acCmdSelectAllRecords

DoCmd.RunCommand acCmdDelete

Again, I don't use these, so TEST first.

John P Spencer
Access MVP 2002-2005, 2007-2011

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated October 16, 2023 Views 1,244 Applies to: