Results 1 to 3 of 3
  1. #1
    dreamnauta is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Dec 2011
    Posts
    16

    Delete a Open Query on Close

    Is it possible with VBA to delete a stored query after right after closing the query?



    How would I attack this problem.

    Thanks!

    - Josh

  2. #2
    Stingaway is offline Efficiency Junkie
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2011
    Location
    The deep south. Keep going until you hit water basically.
    Posts
    224
    You could use VBA to actually define and run the query from a variable. From that point there is no actual 'stored' query.

    Alternatively you could run a macro that fires the query, then in the macro have a delete query object defined.

  3. #3
    dreamnauta is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Dec 2011
    Posts
    16
    Thanks! I searched through the query definitions, deleted the query def, and then re-executed.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Trying to Delete record using delete query
    By MooseOTL in forum Access
    Replies: 13
    Last Post: 10-04-2011, 02:30 AM
  2. DAO.Recordsets - When to close and open
    By jgelpi16 in forum Programming
    Replies: 11
    Last Post: 02-08-2011, 09:16 AM
  3. Open Form with instance method & wait to close?
    By GeorgeBakoyannis in forum Forms
    Replies: 1
    Last Post: 10-09-2010, 11:00 AM
  4. Running a Delete (Records) Query on Close
    By NoiCe in forum Queries
    Replies: 1
    Last Post: 07-12-2009, 06:17 PM
  5. Replies: 0
    Last Post: 08-25-2008, 12:17 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums