I need to open a form in datasheet view from the switchboard. I have set all the properties correctly and followed the advice given in thread thread702-823199 the only problem is that the default switchboard opens a password form for two sets of user Admin and Pupils.
From there the switchboard option that does not need a password (pupils) opens correctly.
The Secure area that needs the password displays the error message 'there was an error executing the command'
the code on the password form is
Private Sub cmdShowAdminArea_Click()
If Me.txtPassword <> "avalon" Then
MsgBox "Incorrect Password", vbExclamation, "Access Denied"
DoCmd.Close acForm, "frmPassword"
Else
Forms!Switchboard.Filter = "[ItemNumber] = 0 And [SwitchboardID]=7"
Forms!Switchboard.Refresh
DoCmd.Close acForm, "frmPassword"
End If
End Sub
Any suggestions?
Thanks
From there the switchboard option that does not need a password (pupils) opens correctly.
The Secure area that needs the password displays the error message 'there was an error executing the command'
the code on the password form is
Private Sub cmdShowAdminArea_Click()
If Me.txtPassword <> "avalon" Then
MsgBox "Incorrect Password", vbExclamation, "Access Denied"
DoCmd.Close acForm, "frmPassword"
Else
Forms!Switchboard.Filter = "[ItemNumber] = 0 And [SwitchboardID]=7"
Forms!Switchboard.Refresh
DoCmd.Close acForm, "frmPassword"
End If
End Sub
Any suggestions?
Thanks