Search notes:

Access: DoCmd.DeleteObject

Dropping a table

doCmd.deleteObject acTable, "theTable"
If the table to be dropped is opened, it cannot be closed and the run-time error 2008 is thrown (You can't delete database object '…' while it's open.).
An opened table (or object, for that matter), is closed with doCmd.close:
doCmd.close        acTable, "theTable", acSaveYes ' Or acSaveNo or acSavePrompt
doCmd.deleteObject acTable, "theTable"

See also

doCmd

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/Microsof...', 1758201148, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/Microsoft/Office/Access/Object-Model/DoCmd/deleteObject/index(46): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78