Delete multiple rows in one step (1 Viewer)

are the records you want to delete in subform?
you can add timer to your subform to save the current PK number and the SelHeight (number of selected).
add 1 hidden textbox to your main form.

on the subform's timer event, save the pk(s) selected rows to the hidden textbox.

see this demo.
till today, I am still amazed
tools you create amazing
Thank you Mr. @arnelgp
 
See below please
This works great but, in my table I also have file locations (Table is loaded with files from directories, ie c:\documents\pictures\1212.jpg) I would like to delete the file in the directory as well as the row in the table to get rid of duplicates. (ie same file in 2 different locations) I know the kill command can do this but cannot work out how to delete all selected I can only do the last one selected.
Any help appreciated.
 
Suggest start a new thread about your specific requirements since it all depends on how you are identifying the records to be deleted
 
You can't do this with a delete query since the delete query cannot delete an external file.

You need to use FSO to select the directory. Then you loop through the list of files and delete the file and if necessary, delete it from your table.

HOWEVER, the looping index gets messed up when you loop through the list forward which is the obvious direction, SO delete the files in reverse. Delete the last file, then the last file, then the last file, until there are no more files.
 

Users who are viewing this thread

Back
Top Bottom