G
Guest
Hi I hope someone can help
Im am trying to hide a field on a Access Form, but assign a command button
to make the field visible so that when i click on the command button I am
asked for a password .
This is the what I am trying to use but its not working
Private Sub Command135_Click()
Sub hide()
Dim Password As String
Dim ans As String
Password = "******"
ans = InputBox("Enter Password")
If ans = Password Then
Documents.Visible = True
Else
Documents.Visible = False
End If
End Sub
can someone tell me where i am going wrong
Im am trying to hide a field on a Access Form, but assign a command button
to make the field visible so that when i click on the command button I am
asked for a password .
This is the what I am trying to use but its not working
Private Sub Command135_Click()
Sub hide()
Dim Password As String
Dim ans As String
Password = "******"
ans = InputBox("Enter Password")
If ans = Password Then
Documents.Visible = True
Else
Documents.Visible = False
End If
End Sub
can someone tell me where i am going wrong