Set a password for command tab in Acess form to open sub form

G

Guest

Hello,

I would like to set a password for a coomad tab ( in the form) that opens a
sub form so that if someone wants to open the subform he/she must type the
password.
is this possible by writing a code ? if yes please help
 
A

Arvin Meyer [MVP]

What I'd do is make the subform visible property false or set its height
property to 0. Then you could code something like the following in a command
button:

If InputBox("Enter your password") = "Whatever" Then
Me.subformControlName.Visible = True
Else
MsgBox "You do not have permission to see this data", vbOKOnly,
"Warning"
End If

If you want a custom form so you can hide the password with a mask, just
open it instead and use the close event to check the password and run the
code above.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top