Dec 2, 2005 #1 M8KWR Programmer Aug 18, 2004 864 GB is there a way to delete a query in code, i know how to drop a table, but was wondering if there is some code to delete a query many thanks for any help in advance
is there a way to delete a query in code, i know how to drop a table, but was wondering if there is some code to delete a query many thanks for any help in advance
Dec 2, 2005 #2 JerryKlmns IS-IT--Management Feb 7, 2005 2,062 GR DoCmd.DeleteObject acQuery, "YourQueryName Upvote 0 Downvote
Dec 2, 2005 #3 mp9 Programmer Sep 27, 2002 1,379 GB Alternatively you can use DROP is SQL, even though it is a query you want to drop - you can still use DROP TABLE YourQueryNameHere; The advantage (I think)of using a DROP SQL statement over the DeleteObject is that you don't have to have the DB open exclusively to run it. Upvote 0 Downvote
Alternatively you can use DROP is SQL, even though it is a query you want to drop - you can still use DROP TABLE YourQueryNameHere; The advantage (I think)of using a DROP SQL statement over the DeleteObject is that you don't have to have the DB open exclusively to run it.