Navigating Switchboard from VBA (1 Viewer)

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
 

jfgambit

Kinetic Card Dealer
Local time
Today, 04:06
Joined
Jul 18, 2002
Messages
798
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.
 
T

tgee666

Guest
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?
 

Pat Hartman

Super Moderator
Staff member
Local time
, 23:06
Joined
Feb 19, 2002
Messages
43,603
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

Top Bottom