When initally setup the databases' forms used input boxes for users to enter passwords to navigate from form to form. However, now a separate table has been set up to house the passwords.
Here is the problem and oh boy, do I hope someone can help!
10 different areas. Each area has an individual password.
I.E.
Area Password
Area 1 = TN
Area 2 = GA
and so on....
However, in an attempt to make it easier for the execs to navigate and not need to remember all the different passwords, another Password field has been made with its password. I.E.
Area Password Exec Password
Area 1 TN USA
Area 2 GA USA
Now, currently the code reads (this is for the "Area 1" button):
Private Sub Area1_Edit_Click()
Dim isgm As String
isgm = InputBox("Enter Area1 Password"
If (Len(isgm) > 0) Then
If UCase(isgm) = "TN" Or UCase(isgm) = "USA" Then
DoCmd.OpenForm "Area1", , , , , , ""
ElseIf UCase(isgm) <> "TN" Or UCase(isgm) <> "USA" Then
MsgBox ("Incorrect Password for Tennessee"
DoCmd.OpenForm "Switchboard", , , , , , ""
End If
End Sub
By using the inputbox I am able to specifically tell the code what I am looking for. However, is there away to reference the password table instead of
If UCase(isgm) = "TN" or UCase......
so that if the password changes the code would not need to be modified. The item stumping me is how to tell the code or form that for this button I am looking for the password(s) related to Area1 only.
I hope I am not over complicating an issue......
Thank you for any and all help,
PBrown
Here is the problem and oh boy, do I hope someone can help!
10 different areas. Each area has an individual password.
I.E.
Area Password
Area 1 = TN
Area 2 = GA
and so on....
However, in an attempt to make it easier for the execs to navigate and not need to remember all the different passwords, another Password field has been made with its password. I.E.
Area Password Exec Password
Area 1 TN USA
Area 2 GA USA
Now, currently the code reads (this is for the "Area 1" button):
Private Sub Area1_Edit_Click()
Dim isgm As String
isgm = InputBox("Enter Area1 Password"
If (Len(isgm) > 0) Then
If UCase(isgm) = "TN" Or UCase(isgm) = "USA" Then
DoCmd.OpenForm "Area1", , , , , , ""
ElseIf UCase(isgm) <> "TN" Or UCase(isgm) <> "USA" Then
MsgBox ("Incorrect Password for Tennessee"
DoCmd.OpenForm "Switchboard", , , , , , ""
End If
End Sub
By using the inputbox I am able to specifically tell the code what I am looking for. However, is there away to reference the password table instead of
If UCase(isgm) = "TN" or UCase......
so that if the password changes the code would not need to be modified. The item stumping me is how to tell the code or form that for this button I am looking for the password(s) related to Area1 only.
I hope I am not over complicating an issue......
Thank you for any and all help,
PBrown