Access 2007 - can't break into code on close of form

Posted on 2010-04-05
Medium Priority
Last Modified: 2013-11-28
I have some code that runs on close of a form. The code has extensive error handling, returns no errors when it runs, and appears to execute all operations. However, when I set breakpoints for diagnostic purposes they are ignored and the code runs to completion and the form closes. I stuck in a bunch of message boxes to track what the code is doing, and they all pop up as expected; however, if I attempt to break into the code at a MsgBox <CTRL+Break> the code just runs to completion and the form closes. Does anybody have any suggestions?
Question by:dgmoore1
  • 2
  • 2
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 29794925
place a { stop } command

private sub ....
stop  'add this

Author Comment

ID: 29796314
I put in a stop command as you suggested, but it is ignored as well. I think I'll rebuild the form and see if that helps
LVL 120

Accepted Solution

Rey Obrero (Capricorn1) earned 2000 total points
ID: 29796789
do a debug>compile and clear all errors raised..

and you maybe right about creating a new form, your current form is probably corrupted.

Author Closing Comment

ID: 31710916
Recreating the form solved the problem, so corruption was the culprit. The stop command suggestion was a good one, though, and I'll keep it in mind for the future

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
Beware when using the ListIndex and the Column() properties of a listbox in Access 2007.  A bug has been identified in the Access 2007 listbox code which can cause the .ListIndex property to return a -1, and the .Columns(#) property to return a NULL…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Enter Foreign and Special Characters Enter characters you can't find on a keyboard using its ASCII code ... and learn how to make a handy reference for yourself using Excel ~ Use these codes in any Windows application! ... whether it is a Micr…

589 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question