jonamua1971
Registered User.
- Local time
- Today, 10:59
- Joined
- Mar 3, 2007
- Messages
- 97
Any help will be highly apprecited.
i found a security demo databse on this forum and it is excellent but i need help with the codes to put on forms as they load.
1.Admin.acts as the over all adminstrator for the database. Has full controll over all data and objects contained in the database.
2.Manager>Has full access to data but is limited to their section.
3.Supervisor:Has view access to data but is limited to their section.
4.User:Has acccess to select data and is limited to their Office.
5.Guest:Has view control to data only
samples of code
i found a security demo databse on this forum and it is excellent but i need help with the codes to put on forms as they load.
1.Admin.acts as the over all adminstrator for the database. Has full controll over all data and objects contained in the database.
2.Manager>Has full access to data but is limited to their section.
3.Supervisor:Has view access to data but is limited to their section.
4.User:Has acccess to select data and is limited to their Office.
5.Guest:Has view control to data only
samples of code
Code:
Private Sub Form_Open(Cancel As Integer)
On Error GoTo Err_Form_Open
If User.AccessID = 1 Then
'Here list all buttons that should be anabled for Admin only
Me.cmdAdmin.Enabled = True
Else
Me.cmdAdmin.Enabled = False
End If
If User.AccessID = >1 Then
'Here list all buttons that should be enabled for level 2 only
Me.cmdbutton.Enabled = True
Else
Me.cmdbutton.Enabled = False
End If
Exit_Form_Open:
Exit Sub
Err_Form_Open:
MsgBox Err.Description
Me.Visible = True
Resume Exit_Form_Open