Hands-On Microsoft Access: A Practical Guide to Improving Your Access Skills
| When you open the Northwind sample database, the first thing you see is the switchboard shown in Figure 12.37. (I've assumed you've already told Access not to show the Welcome window again.) A switchboard is a fast way to perform your most common and useful Access tasks. As in the Northwind database, you usually want to display a switchboard at startup so you can get right to work. (I show you how to get Access to do that in the upcoming section "Displaying the Switchboard at Startup.") Figure 12.37. A switchboard is an easy-to-use form for performing Access tasks.
Switchboards are especially helpful for new users who have little knowledge of the inner workings of Access and have no desire or need to contend with the Database window. In fact, if you have a switchboard, you can hide the Database window altogether. It's not the best form of security; but it does make it more likely that other users will work with only those objects you want them to. Switchboards are also convenient timesavers for experienced Access users. They offer fast access to objects you use most often so you can get to work quickly. Using the Switchboard Manager
From a construction point of view, a switchboard is a form composed almost entirely of command buttons that run macros. In early versions of Access, you had to build a switchboard from scratch, but now you can use the Switchboard Manager, available from the Tools, Database Utilities menu. For the most part, you can create your switchboard just by selecting options in its dialog boxes. A little knowledge of some simple macros is helpful in building switchboards. From a theoretical or conceptual standpoint, the Switchboard Manager is not difficult to use. But it is can be confusing, and it's easy to get lost in it. As you work through the steps in the following example, pay special attention to the titles of the various dialog boxes; they can help you fix your position in the switchboard-making process. I've included notes after many of the steps, to let you know why you're doing what you're doing. Often you'll use the main switchboard as a launch point for creating additional switchboard pages; the latter will contain the buttons for executing tasks. For example, the Main Switchboard could have a button to open the Products switchboard, where you could then open the Products report. (Don't worry if you don't understand what I'm talking aboutit will become apparent as you build a switchboard.) Constructing a Switchboard
In the following example, you add two switchboard pages to the main switchboard. You then add buttons that are specific to the switchboard page.
You've created a button on the main switchboard that says Edit/Print Order Data. When you click it, the Orders page appears. Now you'll create buttons on each of the subsidiary switchboard pages to perform tasks.
NOTE When you create a switchboard, you also acquire a Switchboard Items table. For the most part, you can ignore it, and it shouldn't otherwise interfere with your work. But don't be surprised by its presence.
Displaying the Switchboard at Startup
The Startup dialog box, available from the Tools menu, controls how Access qlooks and acts when you open it. The options apply only to the current database. You can use the Startup dialog box to display the Switchboard when Access opens (see Figure 12.41). From Display Form/Page, you open the drop-down list and choose Switchboard. If you want, you can also deselect Display Database Window. Figure 12.41. You can use the Startup dialog box to open the switchboard when you open the database.
NOTE There's another way to open a form and execute other actions when you open an Access database. Create a macro and include any actions you want performed in that particular database at startup. Save the macro and name it AutoExec. When you open the file, Access runs this macro. Note that the AutoExec macro runs after the Startup options have taken effect, so be careful about using both. If your only goal is to have the Switchboard displayed at startup, I think it's easier to use Display Form/Page in the Startup dialog box.
|
Категории