Hi
I'm wanting a macro that will erase the contents of 12 tables (but NOT delete the tables) in one go i.e. I don't want the user to have to click 12 delete queries or have 12 delete queries visible in the Object Navigation Pane. I instead want one macro that will do it all.
In the macro actions menu, I couldn't see an option to clear contents/delete all records of a table.
So I wrote some VBA along the lines of currentdb.execute "delete * from sometable", repeating that for those 12 tables.
How can I get a shortcut in the Object Navigation Pane that you can click to run that code, just like you can run an ordinary macro with a double-click?
Thanks
I'm wanting a macro that will erase the contents of 12 tables (but NOT delete the tables) in one go i.e. I don't want the user to have to click 12 delete queries or have 12 delete queries visible in the Object Navigation Pane. I instead want one macro that will do it all.
In the macro actions menu, I couldn't see an option to clear contents/delete all records of a table.
So I wrote some VBA along the lines of currentdb.execute "delete * from sometable", repeating that for those 12 tables.
How can I get a shortcut in the Object Navigation Pane that you can click to run that code, just like you can run an ordinary macro with a double-click?
Thanks