How to make a switchboard (1 Viewer)

Abigail Florence

New member
Local time
Today, 09:08
Joined
Nov 7, 2022
Messages
10
Hi

I would like to create a main menu page that would be the first thing the user sees when opening the database. Instead of having the use open the tables, queries, forms and reports from the navigation pane, I want links on a main menu page to these so that the user has easy navigation. Could you provide detailed instructions on how to go about this please?

Many thanks

AF
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 09:08
Joined
Sep 12, 2006
Messages
15,662
In my humble opinion, the best way is to get hold of a A2003 switchboard, and switchboard items table.

In this, the switchboard items table has pages of options. Each option can either be a form to use, or a navigation to a different page of options.
The switchboard has all of the code to navigate through the options. When the form first opens it displays the options on page 1.

After A2003, the navigation form worked in a different way, using data macros, and I found it rather difficult to understand and modify.

Here's a sample database with an A2003 switchboard.
I added a US states table and form so I could add some entries to the Switchboard items table.
I added a few more items to the switchboard table so you can see it chaining from 1 menu to another.
Note that you need an item 1 on each switchboard items page.

Command 1 (command value in the items table) changes the active menu page.
Command 3 (command value) opens a form.
There are other command values in the code that I rarely used.

You can copy the switchboard and switchboard items table into any database.
Just set Switchboard as the first form to open.

A2003 came with page manager tools, but it's easier to edit the table directly, I think.
 

Attachments

  • testswitchboard.mdb
    240 KB · Views: 124
Last edited:

MajP

You've got your good things, and you've got mine.
Local time
Today, 04:08
Joined
May 21, 2018
Messages
8,555
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 09:08
Joined
Sep 12, 2006
Messages
15,662
^^^^
I actually got to 25 items, 3 columns of 8, plus a "return".
 

Abigail Florence

New member
Local time
Today, 09:08
Joined
Nov 7, 2022
Messages
10
Thank you for your detailed responses. Perhaps I wasn't clear enough or i didn't understand your instructions. I have a database screenshot below. Instead of the user having to find the table, form, report or query that they want, I want a main menu page with links to the table, form, report or query for easy navigation. (See sample below). This is the only thing that should come up when the user opens the database. Is there a way to do this?
In my humble opinion, the best way is to get hold of a A2003 switchboard, and switchboard items table.

In this, the switchboard items table has pages of options. Each option can either be a form to use, or a navigation to a different page of options.
The switchboard has all of the code to navigate through the options. When the form first opens it displays the options on page 1.

After A2003, the navigation form worked in a different way, using data macros, and I found it rather difficult to understand and modify.

Here's a sample database with an A2003 switchboard.
I added a US states table and form so I could add some entries to the Switchboard items table.
I added a few more items to the switchboard table so you can see it chaining from 1 menu to another.
Note that you need an item 1 on each switchboard items page.

Command 1 (command value in the items table) changes the active menu page.
Command 3 (command value) opens a form.
There are other command values in the code that I rarely used.

You can copy the switchboard and switchboard items table into any database.
Just set Switchboard as the first form to open.

A2003 came with page manager tools, but it's easier to edit the table directly, I think.
I tried what you attached but it didnt work to my favor perhaps there are other ways?
How to you 'set Switchboard as the first form to open'?

many thanks for your guidance.
Abigail
1670926643760.png
1670926823815.png
 

Abigail Florence

New member
Local time
Today, 09:08
Joined
Nov 7, 2022
Messages
10
Thanks for that!

Is it possible to link tables and queries as well as forms onto the switchboard?

I made a hyperlink but I am sure there is a more sophisticated approach?
 
Last edited:

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 09:08
Joined
Sep 12, 2006
Messages
15,662
Thanks for that!

Is it possible to link tables and queries as well as forms onto the switchboard?

I made a hyperlink but I am sure there is a more sophisticated approach?
You wouldn't really want to. 100%. A user should never be able to open a table directly for interactive use.
You don't want anyone to use tables or queries directly, not even yourself, other than during development.
Therefore you also don't want to display the navigation panel, as you have done.

If necessary, present a datasheet form, or maybe offer a way to view a table in readonly mode.

Making these objects available through forms gives you more control over the data, and the application.

You can add processes to the forms to prevent erroneous data and other mistakes being made. Your forms can relate multiple tables together in a way that you just couldn't do using tables directly.

You could easily modify the code to provide a different command number for a table or query, but I can't think I have ever needed to do that. There are a few other commands included in the code for the switchboard form besides 1 and 3, but they are the main ones I use. I tend to run reports through a report selector form, so reports aren't shown separately on my menus, and I can manage date ranges and other filters more easily with a form. There is a menu command option to run a report, though.
 
Last edited:

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 09:08
Joined
Jul 9, 2003
Messages
16,288
Is it possible to link tables and queries as well as forms onto the switchboard?

Yes, but you don't do it directly. You put the query or the table in a form, in datasheet view, and show the user that.
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 09:08
Joined
Jul 9, 2003
Messages
16,288
Is it possible to link tables and queries as well as forms onto the switchboard?

Video number 4 on my website demonstrates opening a query from a command button:-


But please note earlier comments, it is recommended that you don't. Display the data in a form in datasheet view.....
 
Last edited:

Pat Hartman

Super Moderator
Staff member
Local time
Today, 04:08
Joined
Feb 19, 2002
Messages
43,368
I updated the link to my switchboard samples. There is now a third sample in the list. There is also a new form that lets you manage tblSwitchboardItems.

@Abigail Florence You're pretty new here so welcome. You've gotten some excellent advice as well as samples in addition to mine. The problem I find with button switchboards is they have an annoying problem of having to change. Do you want to make changing the switchboard form your life's work or do you want to use a data driven list which is much easier to maintain? If you really like buttons, take a look at the big button sample. Personally, I use the continuous version since when you use security which is included in a more advanced version, you can use security to control what each user sees so they essentially get personalized switchboards.
 

isladogs

MVP / VIP
Local time
Today, 09:08
Joined
Jan 14, 2017
Messages
18,247
I long ago gave up on the built-in Access switchboard and created my own both for ease of use and to allow a virtually unlimited number of options from one form:

In the most extreme case, one of my commercial databases for schools has a main form with a potential of 406 options though in reality there are about 350 in use

The form has 3 columns of buttons:
a) the middle column has a possible 20 buttons. Clicking any of those displays a right hand column of up to 20 buttons: 20*20=400
b) in addition there are 6 stand-alone buttons in the left column : 400+6 = 406

In addition, the options displayed will depend on the role/permissions of the end user

Coding this is no more difficult than the old switchboard!

Here are a few random screenshots of this main form to illustrate its capabilities

MainMenuPastoral.gif


MainMenuCalendar.gif

MainMenuStudents.gif


MainMenuExams.gif
 

Users who are viewing this thread

Top Bottom