Discussion:
Why won't access break at break-point
(too old to reply)
Anthony
2007-01-17 15:08:15 UTC
Permalink
I've placed 2 break-points in the Click sub of a button, but when I click
it, Access does not break. Is this a bug in Access?
Dirk Goldgar
2007-01-17 15:16:46 UTC
Permalink
Post by Anthony
I've placed 2 break-points in the Click sub of a button, but when I
click it, Access does not break. Is this a bug in Access?
Probably not, though it's possible. Questions:

1. Does the code in the procedure actually get executed?

2. If so, did you put your breakpoints on statements that were executed,
or might you have put them on statements that were bypassed due to
conditional logic?

3. If the code was not executed, is the button's OnClick property (on
the Event tab of the button's property sheet) set to "[Event
Procedure]", as it should be?
--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)
Dirk Goldgar
2007-01-17 15:18:45 UTC
Permalink
Post by Anthony
I've placed 2 break-points in the Click sub of a button, but when I
click it, Access does not break. Is this a bug in Access?
Forgot a further, important question:

4. Is the startup option "Use Access Special Keys" (on the Tools ->
Startup dialog) checked? If not, check it.
--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)
Anthony
2007-01-17 15:39:29 UTC
Permalink
Thank you, Dirk:

Yes to all 4 questions.

Strange, I put the word "Stop" (without quotation marks) as the very first
line of code in the click procedure, as well as placing a break-point on the
sub name.

I'm gonna decompile this database, and if that doesn't work, I'll create a
new database and import everything from the existing one into the new one.

If you have any other suggestions please let me know - thanks.
Post by Dirk Goldgar
Post by Anthony
I've placed 2 break-points in the Click sub of a button, but when I
click it, Access does not break. Is this a bug in Access?
4. Is the startup option "Use Access Special Keys" (on the Tools ->
Startup dialog) checked? If not, check it.
--
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)
Dirk Goldgar
2007-01-17 16:01:46 UTC
Permalink
Post by Anthony
Yes to all 4 questions.
Strange, I put the word "Stop" (without quotation marks) as the very
first line of code in the click procedure, as well as placing a
break-point on the sub name.
Hmm. If the "Use Access Special Keys" option was checked when you
opened the database, and all my other questions had a "yes" answer, then
maybe you have got a corrupt VB project.
Post by Anthony
I'm gonna decompile this database, and if that doesn't work, I'll
create a new database and import everything from the existing one
into the new one.
That would be the next step. Good luck.
--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)
Anthony
2007-01-17 15:55:53 UTC
Permalink
Dirk,

!!

After I imported everything in a new database and tried again, Access now
breaks at the breakpoint. good fyi

Thank you for your kind assistance.
Post by Dirk Goldgar
Post by Anthony
I've placed 2 break-points in the Click sub of a button, but when I
click it, Access does not break. Is this a bug in Access?
4. Is the startup option "Use Access Special Keys" (on the Tools ->
Startup dialog) checked? If not, check it.
--
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)
Marshall Barton
2007-01-17 19:03:56 UTC
Permalink
Post by Anthony
After I imported everything in a new database and tried again, Access now
breaks at the breakpoint. good fyi
Note that this kind of corruption is often caused by editing
a form/report's module when the form/report is open in any
view except design view. It's tough to remember this, but
try really hard to **always** switch to design view before
making **any** change to a form/report's code module.
--
Marsh
MVP [MS Access]
Anthony
2007-01-17 19:06:41 UTC
Permalink
thanks!
Post by Marshall Barton
Post by Anthony
After I imported everything in a new database and tried again, Access now
breaks at the breakpoint. good fyi
Note that this kind of corruption is often caused by editing
a form/report's module when the form/report is open in any
view except design view. It's tough to remember this, but
try really hard to **always** switch to design view before
making **any** change to a form/report's code module.
--
Marsh
MVP [MS Access]
Loading...