Disable Debug Button

  • Thread starter Thread starter geetarista
  • Start date Start date
G

geetarista

I want to set up error-trapping in my code so that the users don't have
access to the debug button in my code.

Exactly how do I do this?

This is what my error section looks like now:

Err_cmdExport_Click:
DoCmd.Close acQuery, "qselQueryName"
MsgBox Err.Description
Resume Exit_cmdExport_Click

Thanks!
 
I know that "Break on all errors" is not selected and for some reason
we can't distribute the front end in .mde format. That's why I was
wondering how I can do it with my error traps...
 
One option is to have your users run your database in runtime mode. Create
a link in windows wihch opens your file this way:
msaccess.exe /runtime <yourfilename>
 
I know that "Break on all errors" is not selected...
You can only know this on your computer. The Break on all errors option does
not travel with your application. It is user selectable on each PC. So, the
..mde route (or the runtime switch, as suggested by Zac) are the only ways of
guaranteeing that your code will not break on error.
and for some reason we can't distribute the front end in .mde format.
What might that reason be? A misguided directive from management? Or the
inability to create a .mde file?

You can do as Zac suggested, but you'd better be ready to create your own
menus.


Tom Wickerath
Microsoft Access MVP

http://www.access.qbuilt.com/html/expert_contributors.html
http://www.access.qbuilt.com/html/search.html
__________________________________________
 
The users don't really have access to the VBE because we disable all
menus, etc. at startup--they only have a switchboard at startup to use.
We don't want to do the runtime switch because the users can easily
change that. As far as the .mde file goes, I'm not sure why we cannot
do that, but I think it's because we have to use 2000 format. We can't
lock the code in the VBE either because in our update process, the code
wouldn't copy to each machine.

I've read somewhere that there's a way to just do it with error
trapping, I just didn't know how to do it...
 
Error trapping will only work (in .mdb files) if "Break on all errors" is
*not* set. There is no opportunity to break on all errors in a compiled .mde
file.

I suppose you could run code at startup to help ensure that "Break on all
errors" is not set for your application.
As far as the .mde file goes, I'm not sure why we cannot
do that, but I think it's because we have to use 2000 format.

So, just find a copy of Access 2000 to create your .mde file. It should run
fine in Access 2002 and 2003.


Tom Wickerath
Microsoft Access MVP

http://www.access.qbuilt.com/html/expert_contributors.html
http://www.access.qbuilt.com/html/search.html
__________________________________________
 
Back
Top