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

User Access Problemo

Status
Not open for further replies.

Akart

IS-IT--Management
Nov 14, 2002
71
AU
Hey guys,

I have made an access project in to a ade file and changed the startup options to not allow any menus.
The database is connected to sql server using nt authentication. I have removed access to the databases from all users but the problem is.

When a user opens the ade file while holding shift. They can see all the forms and click on them, which opens up the forms. The can't see any data because of the sql server permissions but i would like to restrict them to using the buttons proivides on the forms.....

Is this possible?

perhaps stop the shift key from working??

Regards,

Akart
 
Take a look at Thread181-24571, be careful how you use the Function and give yourself a way of enabling the bypass key again, just in case.
 
Thanks,

The thread still did not make it clear to me but i will post my reply in the other thread to keep it all together!

Thanks,

Akart
 
Paste the following into a global module:

Public Sub DisableShiftKeyOnOpen()
Dim db As Database
Dim prp As Property
Set db = CurrentDb
Set prp = db.CreateProperty("AllowByPassKey", dbBoolean, False)
db.Properties.Append prp
End Sub

Public Sub EnableShiftKeyOnOpen()
Dim db As Database
Set db = CurrentDb
db.Properties.Delete "AllowByPassKey"
db.Properties.Refresh
End Sub


On a form that you have exclusive access to, create 2 buttons, name them comEnableShiftKeyOnOpen and comDisableShiftKeyOnOpen

Paste the blue text below respectively, into the button's on click events:

Private Sub comEnableShiftKeyOnOpen_Click()
EnableShiftKeyOnOpen
End Sub

Private Sub comDisableShiftKeyOnOpen_Click()
DisableShiftKeyOnOpen
End Sub



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top