PDA

View Full Version : Solved: Access Data Project Security



slchslch
08-17-2005, 09:34 PM
currently i have a ms access application which is in adp. format. how can i disable the 'shift' key in order don't let user enter the design view environment ?....another question is..is thr anyway to implement security option for ms access application to let user access different rights?

xCav8r
08-18-2005, 05:03 PM
To disable the shift key bypass in an .adp, use this code:


Sub ToggleBypassKey(NewSetting As Boolean)
Dim MyProp As Variant
Dim blnPropFound As Boolean
For Each MyProp In CurrentProject.Properties
If MyProp.Name = "AllowBypassKey" Then
MyProp.Value = NewSetting
blnPropFound = True
Exit For
Else
blnPropFound = False
End If
Next
If blnPropFound = False Then
CurrentProject.Properties.Add "AllowBypassKey", NewSetting
End If
End Sub


Keep users from interacting with certain database objects? If you can't set it in SQL Server, then you've got to create your own security system with VBA.

slchslch
08-18-2005, 07:54 PM
its okie..anyway thx for your tips & codes..instead,i'm using this code to disable the bypass key..again thanks!:friends:

Public Sub ToggleKeys(Optional ByVal KeyState As Boolean = True)
With CurrentProject
With .Properties
.Add "AllowByPassKey", KeyState
.Item("AllowByPassKey").Value = KeyState
.Add "AllowSpecialKeys", KeyState
.Item("AllowSpecialKeys").Value = KeyState
End With
End With
End Sub

Private Sub Test()
ToggleKeys False
End Sub

xCav8r
08-18-2005, 07:58 PM
Hey, that's better, but it looks a little redundant. If you add the item with the setting, why set it again?

Makes me wonder though if looping is necessary.

Anyway, you want to talk more about security, or is this solved?

slchslch
08-18-2005, 11:14 PM
Hey, that's better, but it looks a little redundant. If you add the item with the setting, why set it again?

Makes me wonder though if looping is necessary.

Anyway, you want to talk more about security, or is this solved?

yup, you're right this should be more than enough


Public Sub ToggleKeys(Optional ByVal KeyState As Boolean = True)
With CurrentProject
With .Properties
.Add "AllowByPassKey", KeyState
.Add "AllowSpecialKeys", KeyState
End With
End With
End Sub

Public Sub Test()
ToggleKeys False
End Sub


okie, this are my doubts:
1) multi user login management is it consider as a security issue? if so,how should i control that in my network there is only one user can login with his/her username & password. If the application found that there is a person who use the same username and password login the system, the system will remotely ask the user to shut down the system so that the current user can log in.

2) how can i create some sort like workgroup with different group of user and the user in different group,they have different rights on using the system application. I need more control in form access, button access and some modules access etc.

Ken Puls
08-18-2005, 11:23 PM
Hi there, slchslch!

Did you know that you can mark your own threads solved at VBAX? Just see the note in my sig line.

I'll get this one for you though. :)

slchslch
08-18-2005, 11:32 PM
Hi there, slchslch!

Did you know that you can mark your own threads solved at VBAX? Just see the note in my sig line.

I'll get this one for you though. :)

thanks for your reminder kpuls! i will remind myself to do it next time :thumb

xCav8r
08-19-2005, 06:40 PM
Not that I'm suggesting that you buy this, but does this look like something along the lines of what you're wanting to do?

http://www.hallogram.com/accprojsecman/

slchslch
08-19-2005, 07:01 PM
Not that I'm suggesting that you buy this, but does this look like something along the lines of what you're wanting to do?

http://www.hallogram.com/accprojsecman/


i have found out this software also, but regardless of this software izzit any way i can do it by vba or own coding?(haha.i mean without paid la):whistle:

xCav8r
08-19-2005, 07:15 PM
Yes, you can recreate the functionality of the jet user-level security on your own. I don't know to what extent you need to restrict access to the objects in your database that can't be controlled in SQL Server. Anyway, why don't we talk about this on IM where we can go into more detail?