using password to open form

F

Fred Thomas

Two questions, both have to do with a form that I want to
open only after a password is accepted. The password is
entered into textbox "txtPassword" in form "frmPassword"
the form I wish to open is "frmSecondarys. I assigned the
following code to the txtPassword "On Click" event:

Private Sub txtPassword_Enter()
Dim pass As String
pass = administration
If pass = txtPassword Then
DoCmd.OpenForm "frmSecondarys", , , , acFormEdit
Else: MsgBox "Try again!"
End If
DoCmd.txtPassword.SetFocus
End Sub

Needless to say this does not wrork.
First question what should be here?

Second question, is there a way to hid the password as its
being typed in, saw with asterisks.
Really new to this programming thing. TIA
 

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

Similar Threads

Clear a form field in vba 3
help with this code does not work urgent!!!!!!!!!!! 1
Password Box 4
Change Password 1
Form wrangle 2
Complex login problem 3
Login form 2
Password Check 2

Top