Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Password Protect the shift key

Status
Not open for further replies.

dvannoy

MIS
May 4, 2001
2,765
US
How can you password protect the shift key?? I have a access DB that I am including in a VB app..I dont want users to get into the tables..


Thanks
 
Remember, your users could still get into the table by other methods. (F11, right click on form, importing tables to another database, etc).

The only way to truly protect your data would be to set up user level security on the database. Maq [americanflag]
<insert witty signature here>
 
I dont think thats the only way to do it.. If you ever installed a app that uses access tables to store the data and you try and open the database directly from the app directory, it will prompt you for a password no matter if you try and import or hold down the shift key..

how do they do it??
 
That would be the user level security that I mentioned.

Personally, I've never used it so I can't advise you on how to set it up. Read everything in the Access help file on the subject and also do a keyword search here in these forums. I've seen several threads and faqs on setting up security. It should be enough to at least get you started. Maq [americanflag]
<insert witty signature here>
 
The following closes down pretty much everything, and you can start up your own form from autoexec macro.

I run this procedure in the first form opened to disable all. On that form you can log in and then this procedure is run to enable all. After that you can close the DB and then open it with shift.

Obviously the tables in the database can still be imported in other databases. In my case this is fairly useless because the only thing users could get out of this is an encrypted password. Decryption is done in VB, and that's password protected.

I wanted a program that could startup without the need of selecting any name or inputting any password.

(It is a DB that registers sales/stock etc. of the bar of a scout group).

As far as i know it is quite secure by now anyway, except if users that can login to enable the buttons are shouting around their password. Only other possibility is that somebody cracks the Password encryption, which offcourse is possible because it is only a bunch of sting manipulations tied together to get a text that is not comparable any more to the original characters or length of the password.



Public Sub EnableProgramming(hEnable As Boolean)
Set dbCurrent = CurrentDb
dbCurrent.Properties(&quot;StartUpShowDBWindow&quot;) = hEnable
dbCurrent.Properties(&quot;StartupShowStatusBar&quot;) = hEnable
dbCurrent.Properties(&quot;AllowSpecialKeys&quot;) = hEnable
dbCurrent.Properties(&quot;AllowFullMenus&quot;) = hEnable
dbCurrent.Properties(&quot;AllowToolbarChanges&quot;) = hEnable
dbCurrent.Properties(&quot;AllowBuiltInToolbars&quot;) = hEnable
dbCurrent.Properties(&quot;AllowBypassKey&quot;) = hEnable
End Sub &quot;In three words I can sum up everything I've learned about life: it goes on.&quot;
- Robert Frost 1874-1963
 
I am trying to use the tread that junior pointed me to..

I put the enable behind a transparent command button and when I click on it I get the following error..

&quot;Item not found in this collection&quot;

In debug...db.Properties.Delete &quot;AllowByPassKey&quot; is highlited...whats wrong??

Thanks
 
That means you're trying to delete a property that doesn't exist. Did you disable the shift key before trying to re-enable it? If not, then that's the problem. Maq [americanflag]
<insert witty signature here>
 
Why deleting the property if setting it to false does the same thing and avoids the &quot;Item not found&quot; error. &quot;In three words I can sum up everything I've learned about life: it goes on.&quot;
- Robert Frost 1874-1963
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top