PC Review


Reply
Thread Tools Rate Thread

Check if VBA Code is Disabled

 
 
Cory
Guest
Posts: n/a
 
      28th Nov 2008
Running Access 2007 on Vista.

I have a database that I'm trying to give some bare bones security to that I
need some help with. I have a table of usernames and passwords and a form for
the users to enter their username and password into. I have the form opened
when the database is opened via the Autoexec macro. The issue is, if the
database gets moved or copied to somewhere that isn't a trusted location,
then the code behind the form won't run and someone could just close the form
and get into the database.

My question is this, is there a way in the Autoexec macro to check if the
VBA code is enabled or if the database is in a trusted locaton? If everything
was normal, the macro could proceed and open the form, otherwise it would
close the database. If this is possible, then the question of what to do if
the Autoexec macro gets disabled... Any suggestions would be greatly
appreciated.

Thanks in advance for any help that you can provide.

-Cory
 
Reply With Quote
 
 
 
 
Tom van Stiphout
Guest
Posts: n/a
 
      30th Nov 2008
On Fri, 28 Nov 2008 08:01:04 -0800, Cory
<(E-Mail Removed)> wrote:

CurrentProject.IsTrusted

The Northwind sample database uses this.

-Tom.
Microsoft Access MVP


>Running Access 2007 on Vista.
>
>I have a database that I'm trying to give some bare bones security to that I
>need some help with. I have a table of usernames and passwords and a form for
>the users to enter their username and password into. I have the form opened
>when the database is opened via the Autoexec macro. The issue is, if the
>database gets moved or copied to somewhere that isn't a trusted location,
>then the code behind the form won't run and someone could just close the form
>and get into the database.
>
>My question is this, is there a way in the Autoexec macro to check if the
>VBA code is enabled or if the database is in a trusted locaton? If everything
>was normal, the macro could proceed and open the form, otherwise it would
>close the database. If this is possible, then the question of what to do if
>the Autoexec macro gets disabled... Any suggestions would be greatly
>appreciated.
>
>Thanks in advance for any help that you can provide.
>
> -Cory

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Check in server code if Javascript is enabled/disabled in browser GeezerButler Microsoft Dot NET Framework 0 19th Apr 2008 07:09 PM
Spell Check Disabled KerriH Microsoft Word Document Management 4 25th Jan 2008 04:35 PM
Spell check is disabled Rick Microsoft Word Document Management 2 14th Dec 2007 05:38 PM
vba check for disabled macros Ray Maas Microsoft Excel Programming 2 8th Jun 2006 03:56 PM
check disabled Hrvoje Voda Microsoft C# .NET 3 30th Sep 2005 08:51 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:33 AM.