if i "nest" switchboards that I have access to create, is there a way change
the appearance on each of them or will they all have to look the same? Also,
is there a way to run a query from a switchboard?
There is only one Switchboard form if you have used the built-in
switchboard manager to create your form. However, you could change
label text (or make labels visible or not visible), as well as change
the switchboard form color by code, depending upon the SwitchboardID
number.
Add code to the Private Sub FillOptions() Sub Procedure.
If Me!SwitchboardID = 2 Then
Me.Section(0).BackColor = vbRed
Label1.Caption = "Reports"
Label2.Caption = "Reports"
ElseIf Me!SwitchboardID = 3 Then
Me.Section(0).BackColor = vbGreen
Label1.Caption = "Queries"
Label2.Caption = "Queries"
Else
Me.Section(0).BackColor = -2147483633
Label1.Caption = "Forms"
Label2.Caption = "Forms"
End If
Change the colors and captions as wanted.
Running a query is not directly supported by the Access switchboard
manager. You can either add a new Constant to the Sub Procedure, or
simply use Run Code or run Macro (which the manager can do) to run a
code module or a macro, that in turn opens the query.
Your best bet, however, is to create your own forms with command
buttons to use as switchboard. If you use the Command Button wizard,
Access will write most of the code for you.
You'll have much more control and maintenance will be much easier.