H
herwig
Hello,
In my database, different users can login with a password
I want to protect a form that contains very much fields if the user has
login code 'hbevoe = 1', BUT 1 search field (naampje) can be filled in.
If the user has another login code, he can fill in al the fields (or
change).
I'm able to lock that form, but how can I unlock that search field?
I have following code on a button that opens that form:
-------------
Private Sub Knop6_Click()
On Error GoTo Err_Knop6_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmTest"
If HBevoe = 1 Then
DoCmd.OpenForm stDocName, , , stLinkCriteria, acFormReadOnly
Forms![frmTest]![naampje].Locked = False
Else
DoCmd.OpenForm stDocName, , , stLinkCriteria
End If
Exit_Knop6_Click:
Exit Sub
Err_Knop6_Click:
MsgBox Err.Description
Resume Exit_Knop6_Click
End Sub
In my database, different users can login with a password
I want to protect a form that contains very much fields if the user has
login code 'hbevoe = 1', BUT 1 search field (naampje) can be filled in.
If the user has another login code, he can fill in al the fields (or
change).
I'm able to lock that form, but how can I unlock that search field?
I have following code on a button that opens that form:
-------------
Private Sub Knop6_Click()
On Error GoTo Err_Knop6_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmTest"
If HBevoe = 1 Then
DoCmd.OpenForm stDocName, , , stLinkCriteria, acFormReadOnly
Forms![frmTest]![naampje].Locked = False
Else
DoCmd.OpenForm stDocName, , , stLinkCriteria
End If
Exit_Knop6_Click:
Exit Sub
Err_Knop6_Click:
MsgBox Err.Description
Resume Exit_Knop6_Click
End Sub