Navigating Switchboard from VBA

  • Thread starter Thread starter tgee666
  • Start date Start date
T

tgee666

Guest
Does any one know how to open a particular page of a switchboard from VBA? I'd rather use the default switchboard rather building custom switchboard forms. I already have the switchboard built. I just want to be able to run some code first and then open the next screen. Hope this isn't confusing

Thanks in Advance. :D
 
Why not create a Macro that will run your code then open the form you have created? If you call it AutoExec it will run everytime you open the database.

As a side note, to stop the AutoExec running hold down the "SHIFT" key during the opening of the database.
 
The form I'm trying to open is the Switchboard form but I would like a later screen not the default opening one. Is there a way to open it to a particular record knowing the SwitchboardID, Item Number and/or Argument from the table?
 
Try using an OpenForm method with a where argument.

DoCmd.OpenForm "Switchboard", , , "[ItemNumber] = 0 AND [SwitchboardID]=" & TheSwitchboardNumber

You can figure out what value you need for the TheSwitchboardNumber by finding the ItemNumber of the switchboard that you want to open in the Switchboard Items table.
 

Users who are viewing this thread

Back
Top Bottom