Teedee Access Teedee 2010
Main Form (Switchboard)

Main Form

Now that we have a basic function database all we need to do is make the functions more accessible. To do this we want a form which is opened at startup and is displayed all the time. This form will have buttons fo access the various forms and reports. We need buttons for the forms Customers, Invoices and for the reports. Finally we need a button to exit the database. From the Database Window select Forms and click New In the New Form dialog select Design View and click OK A blank form is displayed. Roughly set its size by dragging the right and bottom edges of the form. Ensure the Wizard button in the Toolbox is depressed (See opposite). Create three labels: "Invoices", "by" and "Company Name" Set their properties and their sizes. Now drag them into position. HINT: Make each label the full width of the form and centre the text in the label using the Formatting Toolbar button.

Create an Exit Button

The Exit button will close Invoices From the Toolbox click the Command Button tool Ensure the Wizard is active Click on the form where you want the button to be located or drag the mouse pointer to the size you want the button The Command Button wizard starts. Select Application and Quit Application Click Next Select the Text option and enter E&xit (the second character is an ampersand) then click Next Give the button a name btnExit (notice no ampersand) Click Finish

Create a Button to Open a Form

From the Toolbox click the Command Button tool. Ensure the Wizard is active (button depressed on Toolbox) Click on the form where you want the button to be located or drag the mouse pointer to the size you want the button The Command Button wizard starts. Select Form Operations and Open Form then click Next Select the form you require and click Next Select Open the form and show all records and click Next Select Text option and enter a description of the form required eg Customers. (This is what the user will see. It will be the Caption of the button. Use a unique underline letter for activation if required) Name the button eg btnCustomers and click Finish

Create a Button to Open a Report

Follow the same procedure as a form but select Report Operations and Preview Report
3 2

Set Form Properties

For the main form we want the form to Be centered on the screen Have no scroll bars, no record selectors, no navigation buttons, no border Not be able to be resized To achieve this Open the form in Design View Click in the Detail Section outside the form (the darker grey area) If necessary type ALT ENTER to open the Properties & select the Format tab
Properties of the Main Form Caption None (Will not have Title bar) Default View Single Form Allow Form View Yes Allow Datasheet View No Allow PivotTable View No Allow PivotChart View No Scrollbars Neither Record Selectors No Navigation Buttons No Dividing Lines No Auto Resize Yes Auto Center Yes Border Style None Control Box No Max Min Buttons No Close Button No Whats This Button No


Quick Access Key

On Access controls an underlined letter means you can activate that control by typing ALT + <Letter>. For example, Save is avtivated by ALT S

Create a Quick Access Key

In the CAPTION (not the name) of the control place an ampersand (&) before the letter required. The ampersand will not be displayed and the following letter will be underlined. For example, &Save will become Save. If multiple controls have the same underlined letter only the first instance of an underlined letter is recognised. If you want a caption such as Bubble & Squeek you must enter Bubble && Squeek in the Caption. Doubling the ampersand tells Access to use the ampersand literally
Home Tutorial Code Snippets