Results 1 to 3 of 3
  1. #1
    ts_hunter is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2014
    Posts
    30

    Query running on DoCmd.Quit?


    I have a "Exit" button on my main form that executes a DoCmd.Quit. This main form also has a Listbox that is loaded by a query. When I click the exit button, the DoCmd.Quit executes (I ran a debug), but then I get a prompt for the parameter for my query. This used to work fine, but the last few days it has been doing this.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    You can try a decompile:

    http://www.granite.ab.ca/access/decompile.htm

    I had a 2000 application that had been working for years start doing something similar after I converted it to 2007. After the Quit, it ran the load event of the form, which had a line looking for another form, which had already closed because of the Quit. Of course that threw an error. I never found out how to actually fix the problem, but was able to trap for the error in the load event to get around it. Stumped a lot of people with that one though.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    ts_hunter is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2014
    Posts
    30
    I found what causes the issue for me, but I don't know WHY it causes the problem.

    Below is a screen shot of my form. With no tab control, the exit button works fine. When I added the Maintenance tab with nothing on it, it still worked fine. When I dragged the Maintenance subform onto the Maintenance tab, that is when the Exit button starting giving me issues. Anyone know what the subform on the 2nd tab would do to cause the listbox on the first tab to try and requery during exit?



    Click image for larger version. 

Name:	snip1.JPG 
Views:	7 
Size:	24.3 KB 
ID:	15271

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

Similar Threads

  1. Replies: 10
    Last Post: 03-12-2013, 01:41 PM
  2. Cancel button in Quit Macro
    By ashu.doc in forum Forms
    Replies: 3
    Last Post: 09-19-2012, 04:40 PM
  3. Replies: 1
    Last Post: 02-13-2012, 10:43 AM
  4. Quit/Terminated Employee Table
    By mwabbe in forum Access
    Replies: 6
    Last Post: 09-24-2010, 02:37 PM
  5. The command or action Quit isn't available
    By Macallan60 in forum Access
    Replies: 0
    Last Post: 04-26-2010, 09:59 AM

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