Not allowing breakpoints in the code

R

Robert

What setting can you set that will not let you set a breakpoint in the code?
It's supposed to have something to do with Startup.

Robert
 
A

Allen Browne

If the breakpoints are not sticking, you need to decompile.

Try this sequence (in order):

1. Uncheck the boxes under:
Tools | Options | General | Name AutoCorrect
In Access 2007, it's:
Office Button | Access Options | Current Database | Name AutoCorrect
Explanation of why:
http://allenbrowne.com/bug-03.html

2. Compact the database to get rid of this junk:
Tools | Database Utilities | Compact/Repair
or in Access 2007:
Office Button | Manage | Compact/Repair

3. Close Access. Make a backup copy of the file. Decompile the database by
entering something like this at the command prompt while Access is not
running. It is all one line, and include the quotes:
"c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
"c:\MyPath\MyDatabase.mdb"

4. Open Access (holding down the Shift key if you have any startup code),
and compact again.

5. Open a code window.
Choose References from the Tools menu.
Uncheck any references you do not need.
For a list of the ones you typically need in your version of Access, see:
http://allenbrowne.com/ser-38.html

6. Still in the code window, choose Compile from the Debug menu.
Fix any errors, and repeat until it compiles okay.

7. Still in the code window, choose Options on the Tools menu. On the
General tab, make sure Error Trapping is set to:
Break on Unhandled Errors
and the Compile on Demand is unchecked.
 
T

Tom Wickerath

Hi Robert,

Tools | Startup | Allow Access Special Keys

With this option deselected, any break points that you attempt to set in
code will not be honored. Usually people want break points to work, so they
need to have this option checked.

Note: You need to quit Access and re-start it in order for changes in this
option to take effect.

If you compile your application to the .mde form, then others will not be
able to see any of your VBA code, so, by default, they won't be able to set a
break point. (The canocial [human-readable] form of the VBA code is stripped
out during the process of creating a .mde file).


Tom Wickerath
Microsoft Access MVP
https://mvp.support.microsoft.com/profile/Tom
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________
 
R

Robert

Thank you. I don't know why anyone would want to do this but that's the
answer I was looking for.

Tom Wickerath said:
Hi Robert,

Tools | Startup | Allow Access Special Keys

With this option deselected, any break points that you attempt to set in
code will not be honored. Usually people want break points to work, so
they
need to have this option checked.

Note: You need to quit Access and re-start it in order for changes in this
option to take effect.

If you compile your application to the .mde form, then others will not be
able to see any of your VBA code, so, by default, they won't be able to
set a
break point. (The canocial [human-readable] form of the VBA code is
stripped
out during the process of creating a .mde file).


Tom Wickerath
Microsoft Access MVP
https://mvp.support.microsoft.com/profile/Tom
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________

Robert said:
What setting can you set that will not let you set a breakpoint in the
code?
It's supposed to have something to do with Startup.

Robert
 
R

Robert

I think the answer to this question is to turn off allowing "Special Keys"
in Startup, though I don't know why anyone would want to disable
breakpoints.
 

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

Top