Customizing built-in Switchboard

J

Joel Wiseheart

I have a main switchboad, using the built-in Access 97
Switchboard Manager, with buttons assigned as follows:

() Exit Database
() Data Entry Forms
() Reports
() Administrative Functions

I would like it so that when you click "Administrative
Functions," another window pops up prompting for a
password. That's easy enough. Once the proper password is
entered, then I would like it to forward to the next
Switchboard menu.

Or in other words, make it so anyone can get to the other
buttons, but require a password for the last one.

Any ideas?

Thanks!
 
J

Joel Wiseheart

Thanks, this wasn't exactly what I was looking for, but it
pointed me in the right direction. I did get it to work.
The problem is that the main switchboard is already open.
I needed to program the first switchboard button to open
the form you described, and used the following to open the
next switchboard if the correct password was entered:

Private Sub btnPassword_Click()

Dim strDocName As String
Dim strLinkCriteria As String

If Me!txtPassword.Value = "password1" Or _
Me!txtPassword.Value = "password2" Then

'This is the line I needed:
Forms!Switchboard.Filter = "[ItemNumber] = 0 AND
[SwitchboardID]= 2"

DoCmd.Close acForm, "f_PasswordValidation",
acSaveNo
Else
MsgBox ("Incorrect Password. Try again.")
End If

End Sub

And, I also noticed I had to change the command number
to "3", for opening a form, from the Switchboard Items
table.

And I changed the passwords for the sake of posting here!

Thanks for your help,
Joel
 
J

Joel Wiseheart

Thanks, this wasn't exactly what I was looking for, but it
pointed me in the right direction. I did get it to work.
The problem is that the main switchboard is already open.
I needed to program the first switchboard button to open
the form you described, and used the following to open the
next switchboard if the correct password was entered:

Private Sub btnPassword_Click()

Dim strDocName As String
Dim strLinkCriteria As String

If Me!txtPassword.Value = "password1" Or _
Me!txtPassword.Value = "password2" Then

'This is the line I needed:
Forms!Switchboard.Filter = "[ItemNumber] = 0 AND
[SwitchboardID]= 2"

DoCmd.Close acForm, "f_PasswordValidation",
acSaveNo
Else
MsgBox ("Incorrect Password. Try again.")
End If

End Sub

And, I also noticed I had to change the command number
to "3", for opening a form, from the Switchboard Items
table.

And I changed the passwords for the sake of posting here!

Thanks for your help,
Joel
 

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