I just started experimenting with access this year and am still trying to wrap my head around coding so I could use a little help if you don't mind.
In my database I have the navigation bar and the ribbon hidden so it looks a little more user friendly for those who use it. I have an administrative log in section where I can log in and make the ribbon and navigation bar reappear so I can make back end data changes.
I am currently using the below code for the log in, but of course the password is viable when I type it in. I have created a form so that I can type in the password with the letters hidden(***) into a text box, but I can't figure out how to code the text box for the entered password to work the way I want to. I also don't know which event to use.
I want the password, if correct to
open form Menuboard Admin
close form Enter Password
If incorrect, just deny access to the page, which is how the below code handles it.
Any help would be appreciated!
Private Sub Command20_Click()
Dim PassWord As String
strPassword = "12345"
If InputBox("Enter Administrator Password") = strPassword Then
DoCmd.OpenForm "Menuboard Admin"
DoCmd.Close acForm, "Menuboard Main Start"
Else
MsgBox ("You're not authorized for Administrator access.")
End If
End Sub
In my database I have the navigation bar and the ribbon hidden so it looks a little more user friendly for those who use it. I have an administrative log in section where I can log in and make the ribbon and navigation bar reappear so I can make back end data changes.
I am currently using the below code for the log in, but of course the password is viable when I type it in. I have created a form so that I can type in the password with the letters hidden(***) into a text box, but I can't figure out how to code the text box for the entered password to work the way I want to. I also don't know which event to use.
I want the password, if correct to
open form Menuboard Admin
close form Enter Password
If incorrect, just deny access to the page, which is how the below code handles it.
Any help would be appreciated!
Private Sub Command20_Click()
Dim PassWord As String
strPassword = "12345"
If InputBox("Enter Administrator Password") = strPassword Then
DoCmd.OpenForm "Menuboard Admin"
DoCmd.Close acForm, "Menuboard Main Start"
Else
MsgBox ("You're not authorized for Administrator access.")
End If
End Sub