Link to home
Start Free TrialLog in
Avatar of seanmonk
seanmonk

asked on

Disable Shift-Key get-around on load

Hi,

I don't know what the proper question is, but I have a program that loads only special menus and disables the database window and right-click, etc. on boot, but if the user knows to use the shift-key when they load the program, they can get around this.

I want to know how to create a .mde file that does not allow users to see the database windows or have right-mouse button options, etc. even if they hold down the shift key.

Can it be done?  How?

Thanks

Sean
Avatar of nico5038
nico5038
Flag of Netherlands image

This link shows a way for the shift key:
http://www.mvps.org/access/modules/mdl0011.htm

Nic;o)
ASKER CERTIFIED SOLUTION
Avatar of Gudare
Gudare

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of seanmonk
seanmonk

ASKER

Gudare,

I tried that, but got a type-mismatch on        
>> Set prp = dbs.CreateProperty(strPropName, varPropType, varPropValue)

Any ideas?  What references do I need loaded?

Sean
You're in 2000, not 97. Problem is that this is a DAO reference. DAO 3.6 library should work, change all the declarations to DAO.property, DAO.Database, so on.
Gudare,

I removed the error stuff to see what would happen (since I was getting the type mismatch).

The code now reads as follows:



Sub SetStartupProperties()

   ChangeProperty "AllowBypassKey", dbBoolean, False
   
End Sub

Function ChangeProperty(strPropName As String, varPropType As Variant, varPropValue As Variant) As Integer

   Dim dbs As Database, prp As Property

   Set dbs = CurrentDb
   dbs.Properties(strPropName) = varPropValue
   ChangeProperty = True

End Function



When I run it I get a "Property Not Found" error on the following line:

>>   dbs.Properties(strPropName) = varPropValue

Sean
Craig,

That worked great.  Thanks.

Another quick note if you have a second.  I thought that would protect my database, but it seems that people can still create a blank database and then import all my objects and see my data structure, etc.  How can I protect against that?

If this is a separate question, then let me know and I'll post it as such.

Thanks

Sean
Seperate question, yes, but no worries, not here for the points. :)

Short version, long story: Access DB Permissions. You need to remove their rights to the objects. Problem with this is then they can't get in. If you're trying to protect against thievery of information from people who aren't supposed to get in, then security is the way to go. If you're trying to protect against the people who need to get access to this stuff, you're basically SOL. Using an MDE file will help with some of it, but if they can access the file, they can import it.

The only true way to make sure they can't get their grubby mitts into the structure of the database is to run-time the database using the MS Office Developers edition, which I currently don't have access to so I can't walk you through it or confirm complete security against imports.

The real key to it is that the import procedure only cares about permission to the object. Without modifying the actual software of MSAccess, I know of no other way to secure your DB from it.

You *might* still want to post this as a new question, lord knows I'm far from knowing everything about hidden properties in an access DB, but I'm pretty positive it can't be done without mde'ing or runtiming the database.
Craig,

Thanks.  I'll think about exactly what I want to do and post the question.  It is complex, since I want to deal with a bunch of issues related to security, including logging in, restricting certain areas, etc.

Thanks again for your help

Ben