Hi:
I have the followign code on the open event of my form. If the Userlevel is user then I want to hide a button on my form and if not I want to display it. When I run the code it displays the button even if Userlevel is user. Don't know what I am doing wrong?
Private Sub Form_Open(Cancel As Integer)
If DLookup("[USERLEVEL]", "N_tblLocalUser", "[USERLEVEL] = 'user'") = "user" Then
Me!Command0.Visible = False
Else
Me!Command0.Visible = True
End If
End Sub
Thanx
Ekta
I have the followign code on the open event of my form. If the Userlevel is user then I want to hide a button on my form and if not I want to display it. When I run the code it displays the button even if Userlevel is user. Don't know what I am doing wrong?
Private Sub Form_Open(Cancel As Integer)
If DLookup("[USERLEVEL]", "N_tblLocalUser", "[USERLEVEL] = 'user'") = "user" Then
Me!Command0.Visible = False
Else
Me!Command0.Visible = True
End If
End Sub
Thanx
Ekta