Autoeng
Why me?
- Local time
- Today, 09:19
- Joined
- Aug 13, 2002
- Messages
- 1,302
So that a user can enter information into one field in a protect db I put the following code into the form. There are three fields and I have disabled two of them allowing them to write to the third. However, this is a tabbed form with another form as the tab. How can I protect the tabbed form without listing each and every field as false as there are many fields on the second page. Should the code be attached to the second form or the first?
Code:
Private Sub Form_Open(Cancel As Integer)
Dim UserLoggedIn As String
UserLoggedIn = CurrentUser()
If UserLoggedIn = "username" Then
Field1.Enabled = False
Field2.Enabled = False
End If
End Sub