Home Access 2002 Forms Tab Through A Form- Changing The Order Of Fields
Search MS Office A-Z   |   Search Web Pages/ Design A-Z

Tab Through A Form- Changing The Order Of Fields

You need forms to enter data into your database and view the information on-screen. Sometimes you’ll have no problem creating forms that are perfect from the get-go, but this isn’t usually the case. Most of us probably find ourselves wanting to modify forms in some way, such as adding, deleting, or repositioning fields.

For the most part, these types of changes don’t cause significant problems for database users; however, there is at least one exception: the tab order. Let’s assume you have a form with the customer contact information in a single column, so you display the phone number field first, followed by the fax number field and email address field. Now that email has become one of the most common ways to contact someone, you decide that the email address should appear above the fax number instead of below it.

Although you can easily move the email address so it appears above the fax number (and below the phone number), the tab order will remain as it was, so when you press TAB after entering the phone number in its field on your form, the cursor still jumps to the fax number field--not the email address field you just moved. As a result, the static tab order largely defeats the purpose of making such a move.

In this tutorial we’ll explain how to change the tab order so that it corresponds to your form and your information needs. Along the way you’ll also learn how to add text boxes and their accompanying labels to a form. Let’s get started.

Create A Form .

To follow our directions, you’ll need to create new objects in the Northwind database, so we suggest that you make a copy of the database file before proceeding. Navigate to the Northwind.mdb database in the Samples subfolder of your Microsoft Office folder. Copy Northwind.mdb to the Clipboard and paste it in another folder. Rename the file CopyOfNorthwind.mdb, which you can now open and use without worrying about changing the original file .

After opening the CopyOfNorthwind.mdb file, open the Suppliers table by selecting Tables from the Objects list on the left and double-clicking Suppliers from the list on the right. Briefly review the data and take note of how the table lists the contact information for Northwind’s suppliers. Close the table. .

With Suppliers still selected in the Database window, choose Form from the Insert menu. Make sure Design View is selected in the New Form dialog box that opens and click OK. .

When the form displays, select CompanyName in the Suppliers field list. Next, press CTRL and click Address, City, Region, PostalCode, and Country. With six fields now selected in the field list, click CompanyName (or any other selected field) and drag the fields to the design area. Drop them one inch from the left and two rows of dots from the top (positioning doesn’t have to be exact). Open the Format menu, choose Vertical Spacing, and click Increase to add a little room between controls. Then open the File menu, click Save, type SC Tab Stops in the Form Name field, and click OK. .

Make Some Modifications .

Let’s assume that your boss tells you that she’d like to see phone numbers listed on the right side of company names. She also wants to add all the suppliers in her address book to the database. Your boss’ contact information appears in the following order: company name, phone number, address, city, region, postal code, and country.

In the Suppliers field list, click Phone so that it’s the only field selected. Drag and drop that field 3.5 inches from the left and two rows of dots from the top. .

Click the View button on the far left side of the main toolbar to switch to Form view. (See Figure 1.) With the cursor in the Company Name field, press TAB, and note that the cursor moves to the Address field. To enter contact information for new suppliers, your boss will want the cursor to jump directly to the Phone field instead, so you’ll need to change the tab order. .

Change The Tab Order .

Click the View button to switch to Design view. Click anywhere in the form to deselect the Phone text box. Open the View menu and choose Tab Order. When the Tab Order dialog box appears, note that the Detail option is selected in the Section area. In the Custom Order area, move your mouse pointer to the field selector (small gray square) next to the Phone field. When the pointer becomes a right-arrow icon, click to select the Phone field. .

Click the field selector for Phone again and then drag the field so it’s directly below the CompanyName field in the Tab Order dialog box. When a thicker line appears between the CompanyName and Address fields (see Figure 2), release the mouse button. The Phone field is now below the CompanyName field. Be sure to click OK to save your changes and close the dialog box. .

Click the View button to return to Form view. With the cursor in the Company Name field, press TAB and watch the cursor now jump to the Phone field. Press TAB again, and the cursor returns to the Address field in the first column. .

Now that you’ve successfully completed the tab order change, you can close the form, save your changes, and exit Access.



Home Access 2002 Forms Tab Through A Form- Changing The Order Of Fields
Search MS Office A-Z   |   Search Web Pages/ Design A-Z