Adding a code to the switchboard

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do I write the code to have a form open when the switchboard opens? I
know that I need to use the DoCmd.OpenForm code but I don't know what the
rest of the code should be. I am trying to have a form open but also be
hidden from the users when the database opens to the switchboard.
 
How do I write the code to have a form open when the switchboard opens? I
know that I need to use the DoCmd.OpenForm code but I don't know what the
rest of the code should be. I am trying to have a form open but also be
hidden from the users when the database opens to the switchboard.

You could code the Switchboard Open (or Load) event:
DoCmd.OpenForm "FormName"
 
Actually one other thing. I need this form to be opened at all times even
when the switchboard is closed. Where can I put this code to run in a hidden
form all the time the database is opened?
 
Actually one other thing. I need this form to be opened at all times even
when the switchboard is closed. Where can I put this code to run in a hidden
form all the time the database is opened?

Click on Tools + StartUp.
Set the Display Form/Report box to the Switchboard.

Code the Switchboard's Open event:

DoCmd.OpenForm "FormName", , , , , acHidden

I have no idea why you want it open all the time, but if you wish it
to stay open, don't close it.
When the Database closes it will close the form.
 
Back
Top