Switchboards from Macros

G

Guest

have an application with a "Main Switchboard" and some other switchboards driven from Main. How do I get to the other switchboards from a macro? Unlike Main Switchboard, they don't show up as a form (which is what I think they are). "Open Form" with "Main Switchboard" as the argument works fine - how do I do this for the sub switchboards

Thanks

dave
 
J

Jeff Boyce

Dave

I don't understand. If your application has a main switchboard, that sounds
like the place you want folks to start. Why would you want a different
switchboard (a "sub" switchboard) to be the starting point?

For what it's worth, the convenience that using the Switchboard manager adds
is somewhat balanced by its limitations.

If you want more control over which form is opened, when, consider building
your own menu structure form, and using the DoCmd.OpenForm command to open
specific forms.

If your application has main menus and submenus, you can create a main menu
form and submenu forms, each with their respective command buttons, each
opening their respective forms.
 
V

Van T. Dinh

If you are using the *in-built* Switchboard created by Switchboard Manager,
the Sub-Switchboard is actually the *same* Form filled with Items that you
assigned to the Sub-Switchboard.

To show a particular Sub-Switchboard (SB), you usually use the SB Manager to
add an Item on the Main SB or another Sub SB to go to this Sub SB

If you want to use Macro, you will need to find the SwitchboardID of this
Sub-SB from the [Switchboard Items] Table. Look for the Record/Row that has
the name of your Sub SB as [ItemText] value. Use the following Macro
actions in your Macro (in my test in AXP, my Sub SB has SwitchboardID = 2):

1. Macro action: OpenForm with arguments:
Form Name: Switchboard
Windows Mode: Normal

2. Macro action: ApplyFilter with argument:
Where Condition: ([SwitchboardID]=2) And ([ItemNumber]=0)

The Macro with the above 2 actions will open Sub SB with SwitchboardID = 2.
Replace 2 with appropriate number for the required Sub SB.

Much easier to use the VBA code though.


--
HTH
Van T. Dinh
MVP (Access)



Dave Lee said:
have an application with a "Main Switchboard" and some other switchboards
driven from Main. How do I get to the other switchboards from a macro?
Unlike Main Switchboard, they don't show up as a form (which is what I think
they are). "Open Form" with "Main Switchboard" as the argument works fine -
how do I do this for the sub switchboards?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top