Why won't access break at break-point

  • Thread starter Thread starter Anthony
  • Start date Start date
A

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?
 
Anthony said:
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?
 
Anthony said:
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.
 
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.
 
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.
 
Anthony said:
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.

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.
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.
 
Anthony said:
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.
 
thanks!

Marshall Barton said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top