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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

prevent shift key & open tables

Status
Not open for further replies.

ROMBA

MIS
Feb 14, 2002
43
0
0
BE
Hello,

I have a database that is used by 40 people. There is 1 main table : TBL_LOG . in that table all data is stored. When an assistant opens the database, he only can access his own data based on queries with criteria the domain user name (VB Module fOSusername() )

As this table contains sensitive data, it is of high importance that no one can access data from another person.

Today I discovered that someone is opening the database by pressing the shift key. I want to prevent this, and when he tries to open the table, there is a domain recognition and...... yes appends a table with the domain.

This will allow me to get a view on the abuse that is going on.

I know, I am a naughty manager, but this is the only way to be sure I have a productive team, and to prevent they don't eat each other.

thank you !
 
in meantime I am checking the FAQ. I think I can help me out with the shift key disabling. So I keep looking for a solution to get a domain recognition when the table is opened.
 
Check in the Microsoft: Access Modules (VBA Coding) forum, I remember seeing a thread about this same issue in there...I will look for it for you...

it's in this thread thread705-215116
 
Thanks to your thread link, I found another where this is the tip:

'This Code Disables the Shift Key
'
Public Sub DisableByPassKeyProperty()
Dim db As Database
Dim prp As Property
Set db = CurrentDb
Set prp = db.CreateProperty("AllowByPassKey", dbBoolean, False)
db.Properties.Append prp
End Sub
'********************************************************


'********************************************************
'This Code Re-enables the Shift Key
'
Public Sub EnableByPassKeyProperty()
Dim db As Database
Set db = CurrentDb
db.Properties.Delete "AllowByPassKey"
db.Properties.Refresh
End Sub
'********************************************************

Two functions that must be called for enabling or disabling the shift key.

I use Access 2000 , but this doesn't work

pffff thank you for helping me out.
 
The code doesn't work for you because of some referece issues. Open up the module, go to Tools-->References and select the Microsoft DAO 3.51 (might be 3.60 for Access 2000) Object Library And then change to code to look like this:

**********************************************************
'This Code Disables the Shift Key
'
Public Sub DisableByPassKeyProperty()
Dim db As DAO.Database
Dim prp As DAO.Property
Set db = CurrentDb
Set prp = db.CreateProperty("AllowByPassKey", dbBoolean, False)
db.Properties.Append prp
End Sub
'********************************************************


'********************************************************
'This Code Re-enables the Shift Key
'
Public Sub EnableByPassKeyProperty()
Dim db As DAO.Database
Set db = CurrentDb
db.Properties.Delete "AllowByPassKey"
db.Properties.Refresh
End Sub
'********************************************************

This should do it for you...

There is another issue though, if I want the tables all I have to do is creat a blank DB and "Link" your tables into my new DB then I can view and change them all I want...

If you're looking fo a better way, try searching these forums (this one OR the Module one) for "Security", but even that can be circumvented...

Something to think about...

Kyle ::)
 
On your main form, create a command button, set format properties Transparent Yes, visible Yes (This is your secret Button) on the doubleClick event of the Command Button enter the following code;

On Error GoTo Err_cmdEnterSetUp_DblClick

If InputBox("Enter Design view Password", "password") = "modview" Then
SetStartupProperties
Else
MsgBox "YOUR PASSWORD WAS INCORRECT Access to design mode is denied!", vbCritical, "WARNING!"
SetStartupPropertiesNoBypass
End If
Exit_cmdEnterSetUp_DblClick:
Exit Sub

Err_cmdEnterSetUp_DblClick:
MsgBox err.Description
Resume Exit_cmdEnterSetUp_DblClick



This code when passord is Incorrect disable the Database Window, the F 11 Key as well as the Shift key. I enter the correct password when I need to work on the dB and enter NO when I want to put It back to protection mode. So far, no one has has been capable of breaking this code so I Can sleep at night...

Kyle is right though, If you have a crazy end user, He could do just that. talk to your Admin and see he can disable the link tables ODBC Databases function in ACCESS but so far None of my end users have tought of that one
 
Dany527,

That's not a half bad way of doing it, but...I think I know how to get past that (I won't post it here for obvious reasons) but all-in-all not too bad, because even if I know how to get passed it, I would first have to know that the button is there to think of it. The problem with Access is that the are 150 million different ways to set up security and I have yet to hear of something sounds genuinely foolproof.

So if you're just trying to stop people fom accidentally making an error, that's easy, but if you don't trust your users... Kyle ::)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top