Re: Desiabled Macro's and VBA Code
- From: "JohnC" <anonymous@xxxxxxxxxxxxxxx>
- Date: Tue, 29 Sep 2009 19:49:48 -0500
Gary,
Perhaps you want to make sure that certain code is executed on startup and
you don't want the bypass key (Shift) to be available to the user?
I use a startup form that runs the mandatory code in the Open event. The
database startup option points to this form.
Now to disable the bypass key (Shift) is a little tricky. This is a
database property "AllowBypassKey" that should be set to false when the user
exits the application. Also a good idea to set "AllowSpecialKeys" to false
also. For this to work, this property must be set when the user exits the
application. Then next time they launch the application, the property
values will be False. I don't give the user any way to exit unless they use
the required Exit Application button on the main menu form.
But don't forget to give yourself a way to close the application without
setting the properties to false - a small Label with an OnClick event or
maybe a certain key combination? If you don't do this, you will have a heck
of a time getting back into design mode on the database. In fact get this
part working first. Then proceed to the exit code mentioned above.
Access SQL Advisor had an article on this. There is probably some code
on-line too.
John
"Gary." <gmhull@xxxxxxxxxxxxx> wrote in message
news:eWA6LsFQKHA.4692@xxxxxxxxxxxxxxxxxxxxxxx
Is their a way to setup a database that if the micro's or VBA code is not
activated then the database will shut down?
.
- References:
- Desiabled Macro's and VBA Code
- From: Gary.
- Re: Desiabled Macro's and VBA Code
- From: Douglas J. Steele
- Desiabled Macro's and VBA Code
- Prev by Date: RE: dcount() query
- Next by Date: RE: Conditional Text Box
- Previous by thread: Re: Desiabled Macro's and VBA Code
- Next by thread: How do I activate the Auto List Member option in access 2007?
- Index(es):