Microsoft Office Online
Sign in to My Office Online (What's this?) | Sign in

 
 
Microsoft Office Access
Search
Search
 
Check for updates: (c) Microsoft
Office downloads
 
 
 
Warning: You are viewing this page with an unsupported Web browser. This Web site works best with Microsoft Internet Explorer 6.0 or later, Firefox 1.5, or Netscape Navigator 8.0 or later. Learn more about supported browsers.

Email this linkEmail this link Printer-Friendly VersionPrinter-Friendly Version Bookmark and ShareShare
Creating a new database
 
Applies to
Microsoft Office Access 2003
Microsoft Access 2002

Picture of book cover

This article was adapted from from Chapter 2 of Microsoft Office Access 2003 Step by Step by Online Training Solutions, Inc. Visit Microsoft Learning to buy this book.

Creating the structure for a database is easy. But an empty database is no more useful than an empty Microsoft Office Word document or an empty Microsoft Office Excel worksheet. It is only when you fill, or populate, a database with data in tables that it starts to serve a purpose. As you add queries, forms, and reports, it becomes easier to use. If you customize it with a switchboard and your tools, it moves into the realm of being a database application.

Not every database has to be refined to the point that it can be classified as an application. Databases that only you or a few experienced database users will work with can remain fairly rough-hewn. But if you expect an administrative assistant to enter data or your company's executives to generate their own reports, spending a little extra time in the beginning to create a solid database application will save a lot of work later. Otherwise, you’ll find yourself continually repairing damaged files or walking people through seemingly easy tasks.

Access takes a lot of the difficult and mundane work out of creating and customizing a database by providing wizards that you can use to create entire databases or individual tables, forms, queries, and other objects. It is generally easier to use a wizard to create something that is similar to what you need and then modify it than it is to create the same thing by hand.

You will first create a couple of databases from scratch, first by using a wizard to rapidly create the structure for a sophisticated contact management database, complete with tables, queries, forms, and reports. By the end of this article, you will have a database containing three tables.

Create a database structure the simple way

A few years ago, creating a database structure from scratch involved first analyzing your needs and then laying out the database design on paper. You would decide what information you needed to track and how to store it in the database. Creating the database structure could be a lot of work, and after you had created it and entered data, making changes could be difficult. Wizards have changed this process. Committing yourself to a particular database structure is no longer the big decision it once was. By using the Database Wizard, you can create a dozen database applications in less time than it used to take to sketch the design of one on paper. Access wizards might not create exactly the database application you want, but they can quickly create something very close.

This exercise uses the Database Wizard to create a new database structure. The new database, in this case, will contain the structure for a contact management database.

Tip  The Database Wizard uses predefined templates to create fairly sophisticated database applications. In addition to the templates provided with Access, you will find additional templates and other resources by following the link to Templates on Office Online that is on the New File task pane.


  1. Start Access, and in the task pane, click Create a new file.
  2. In the Templates area of the task pane, click On my computer, and then click the Databases tab to display the available templates.

    The Databases tab of the Templates dialog box

  3. Double-click Contact Management.

    The File New Database dialog box appears so that you can provide a name for your new database and specify where to store it.

    File New Database dialog box

    Tip  The default folder for storing Access database files is My Documents. You can change this default to any other folder by clicking Options on the Tools menu when a database is open , entering a new path in the Default database folder box on the General tab, and clicking OK.

  4. Browse to the folder where you want to save your database, and then click Create.

    The Database window is displayed, and then you see the first page of the Database Wizard, which tells you the type of information that will be stored in this database.

  5. Click Next to move to the second page of the Database Wizard.

    Database Wizard

    This page lists the three tables that will be included in the Contacts database. The box on the right lists the fields you might want to include in the table selected in the box on the left. Required fields have a check mark in their check boxes. Optional fields are italic. You can select the check box of an optional field to include it in the selected table.

  6. Click each table name, and browse through its list of fields, just to see what is available.
  7. Indicate that you want to include all the selected fields in the three tables by clicking Next to move to the next page of the wizard.

    The next page of the wizard appears, displaying a list of predefined styles that determine what the elements of the database will look like.

    Tip  Whenever the Back button is active (not gray) at the bottom of a wizard's page, you can click it to move back through previous pages and change your selections. If the Finish button is active, you can click it at any time to tell a wizard to do its job with no further input from you. Most of the options set by a wizard can be modified later, so clicking Finish does not mean that whatever the wizard creates is cast in stone.

  8. Click each of the styles to see what they look like.
  9. Click Blends, and then click Next.
  10. Click each of the report styles to see what they look like.
  11. Click Bold, and then click Next.
  12. Change the proposed database name to Contacts, leave the Yes, I'd like to include a picture check box cleared, and click Next.

    The Next button is unavailable on this page, indicating that this is the wizard's last page. By default, the Yes, start the database check box is selected, and the Display Help on using a database check box is cleared.

  13. Leave the default settings as they are, and click Finish.

    The process of creating a database can take from several seconds to several minutes. While the wizard creates the database, an alert box tells you what is happening and how much of the process is complete. When the wizard finishes its work, it opens the newly created Contacts database with the switchboard displayed.

    Main Switchboard

    The switchboard opens, and the Database window is minimized. (You can see its title bar in the lower left corner of the Access window.)

  14. In the Main Switchboard, click the Close Button image button.

Check the work of a wizard

Using a wizard to create a database is quick and painless, but just what do you end up with? The Database Wizard creates a database application, complete with a switchboard, several tables, and some other objects. In many cases, all you have to do to have a working database application is add the data. If the wizard's work doesn't quite suit your needs, you can modify any of the database objects or use another type of wizard to add more objects.

For example, if you tell the Database Wizard to create a contact management database, it creates three tables. It doesn't create any queries for this type of database, but it does for some of the other types. The wizard creates forms that you can use to enter or view data, and two reports that you can use to list contacts or summarize the calls made or received during the week. Finally, it creates a switchboard so that users can quickly access the parts of the database needed to perform specific tasks.

In this exercise, you will use the switchboard to take a quick tour of the Contacts database that the Database Wizard has created. You can't check out some of the objects unless the database contains data, so along the way, you will enter information in several of the tables.

  1. If the switchboard for the Contacts database is not displayed, in the Database window, under Forms, double-click Switchboard.
  2. In the switchboard, click the Enter/View Other Information button to display the Forms Switchboard window.

    The Forms Switchboard has two buttons: the first opens a form that you can use to enter or view contact types, and the second returns you to the Main Switchboard window.

  3. Click Enter/View Contact Types to display the Contact Types form.

    Contact Types form

    If the underlying Contact Types table contained any records, you could use this form to view them. The only action we can take now is to add a new record.

  4. In the Contact Type box, type Supplier and press ENTER.

    Access supplies the entry for the Contact Type ID field. Access keeps track of this number and enters the next available number in this field whenever you add a new record.

  5. Repeat the previous step to enter records for Customer and Shipper.
  6. Use the Navigation buttons at the bottom of the form to scroll through the records in the Contact Types table. Then click the Close button Button image to close the form.

    Tip  With most computer programs, saving your work often is important to avoid losing it if your computer crashes or the power goes out. With Access, it is not only not important to save your data, it is not possible to manually save it. When you move the insertion point out of a record after entering or editing information, Access saves that record. This mixed blessing means that you don't have to worry about losing your changes, but you do have to remember that any data entry changes you make are permanent and can be undone only by editing the record again.

  7. Click Return to Main Switchboard.
  8. Click Enter/View Contacts.

    Contacts form

    The Contacts form is displayed. You use this two-page form to enter records in the underlying Contacts table or to view records that are already there. The form has buttons at the bottom to switch between pages and to open other forms from which you can place calls (Dial) or where you can record information about communications you've had with the contact (Calls).

  9. Enter some information on this form — your own first and last name will do — and notice that when you enter your name, Access provides a contact ID.
  10. At the bottom of the form, click the 2 button to move to page 2, and then expand the list of contact types.

    The list displays the three types that you just entered in the Contact Types table through the Contact Types form.

  11. Click one of the contact types.
  12. Return to the first page, click in the Work Phone box to place the insertion point there, type 555-0100, and press ENTER.
  13. Click in the Work Phone box again, and click Dial.

    The AutoDialer dialog box appears, with the contents of the box that is currently selected on the form displayed as a potential number to dial.

    Tip  This dialog box is not part of Access; it is a Microsoft Windows utility. When you click the Dial button, Visual Basic for Applications (VBA) code attached to the button calls the utility. If you were to click Setup, the Location Information dialog box would be displayed. (If you don't have a modem installed, the Install New Modem dialog box appears instead.)

  14. Click Cancel to close the AutoDialer dialog box, and then click the Calls button.

    Calls form

    The Calls form is displayed. This form includes the Call Listing subform, which lists any previous calls you have recorded, and the Call Details subform, which displays details of the selected call. You can record information about communications (phone calls, e-mail exchanges, and so on) that you've had with this contact.

  15. Click in the Subject cell of the new record, and type Order information as the subject.

    Access adds a new record line, where the Call Date and Call Time fields default to the current date and time.

    Calls form

  16. Click in the Call Notes box, and type a short note.
  17. Click the Close button to close the Calls form, and then close the Contacts form.
  18. Click Preview Reports to display the Reports Switchboard window.
  19. Preview the two short reports by clicking the button for each one, reading it, and then closing it.

    When you preview the Weekly Call Summary report, you can enter a range of dates that you want included on the report. If you accept the default range of the current week, the summary of the call you just added is included in the report.

  20. Click Return to Main Switchboard, and then click the Close button to close the Main Switchboard window without closing the database.
  21. Double-click the title bar of the Database window to restore the window.

    Database window

  22. Explore all the objects in the database by clicking each type on the Objects bar and then opening the individual tables, forms, and reports.

    You won't be able to open the Report Date Range form directly, because it is designed to be opened by VBA code that supplies the information that the form needs.

  23. Close the database.

Create tables the simple way

When you use the Database Wizard to create a contact management database, the database has all the components needed to store basic information about people. But suppose The Garden Company needs to store different types of information for different types of contacts. For example, it might want to maintain different types of information about employees, customers, and suppliers. In addition to the standard information — such as names, addresses, and phone numbers — the company might want to track these other kinds of information:

  • Employee Social Security number, date of hire, marital status, deductions, and pay rate
  • Customer order and account status
  • Supplier contact, current order status, and discounts

While building the database, you could add a lot of extra fields to the Contacts table and then fill in just the ones it needs for each contact type, but cramming all this information into one table would soon get pretty messy. It's better to create a database with one table for each contact type: employee, customer, and supplier.

The Database Wizard doesn't offer exactly this combination of tables, so in this exercise, you will create a database with an empty structure. You will then add several tables to the database by using the Table Wizard.

  1. On the File menu, click New.
  2. In the New area of the New File task pane, click Blank database.
  3. In the File New Database dialog box, browse to the folder where you want to save your database, and then click Create.

    Access displays a database window that contains no tables, queries, forms, or other database objects. (You can confirm that the database is empty by clicking each of the object types on the Objects bar.)

  4. On the toolbar of the Database window, click the New button to display the New Table dialog box.

    Tip  Instead of clicking the New button, on the Database toolbar, you can click the down arrow to the right of the New Object button, and then click Table; or you can click Tables on the Objects bar, and then double-click Create table by using wizard; or you can click Table on the Insert menu, and then double-click Table Wizard.

  5. Double-click Table Wizard.

    Table Wizard

    The wizard's first page appears. You can display a list of either business tables or personal tables. Although these categories are generally oriented toward business or personal use, depending on the nature of your business or preferences, you might find the sample table you want in either list.

  6. Take a few minutes to browse through the Business list, and then select the Personal option to see those sample tables.

    Each category contains a list of sample tables. When you click an item in the Sample Tables list, the Sample Fields list displays all the fields available for that table. (If you need more fields, you can add them after creating the table.) Selecting an item in the Sample Fields list and then clicking the > button moves the selected field to the Fields in my new table list. Clicking the >> button moves all sample fields to the Fields in my new table list. The < and << buttons remove one or all fields from your new table list.

  7. Select the Business option, and in the Sample Tables list, select Customers.
  8. Click the >> button to copy all the fields to the Fields in my new table list, and then click Next.

    The next page of the wizard is displayed, in which you can provide a name for your new table and specify whether the wizard should set a primary key for the table. A primary key consists of one or more fields that differentiate one record from another.

  9. Accept Customers as the table name, click No, I'll set the primary key, and then click Next.

    The wizard suggests CustomerID as the field that will uniquely identify records, and asks what type of data the field will contain.

  10. Click Numbers and/or letters I enter when I add new records, and then click Next.

    The last page of the wizard is displayed, in which you can select one of the three option buttons on this page to determine whether the table should open in Design view or in Datasheet view, or whether a wizard-generated form should open so that you can enter data.

  11. Accept the default selection, Enter data directly into the table, and click Finish to create and open the Customers table.
  12. Scroll horizontally through the table to view all the fields created by the wizard based on your selections on its first page. Then close the table.

    The Customers table appears in the Database window.

  13. Start the Table Wizard again, this time by double-clicking Create table by using wizard in the Database window.
  14. Select the Business option, click Employees, and then move only the following fields to the Fields in my new table list, by selecting each field in the Sample Fields list and clicking the > button.

    EmployeeID
    FirstName
    LastName
    Title
    Address
    City
    StateOrProvince
    PostalCode
    HomePhone
    Birthdate
    DateHired
    Photograph
    Notes

  15. In the Fields in my new table list, select StateOrProvince, click the Rename Field button, change the name of the field to State, and click OK.
  16. Click the Next button twice to move two pages forward, naming the table Employees and allowing Access to create a primary key.

    Because one table already exists in the database, the wizard attempts to establish a relationship between the tables and displays a new page.

  17. Click Next.
  18. Click Finish, and then close the Employees table.
  19. Repeat steps 13 through 18 to create a table called Suppliers that includes all the fields provided (don't forget to rename StateOrProvince). Click Finish to accept all the suggestions and defaults.
  20. Close the Suppliers table.

    Three tables are now listed in the Tables pane of the Database window.

Refine how data is displayed

When you use the Table Wizard to create tables and populate them with the fields you specify, the wizard sets a variety of properties for each field. These properties determine what data can be entered in a field and how the data will look on the screen.

The field properties set by Access are a good starting place, and most of them are probably fine as they are. However, suppose some of the properties don't meet your needs. You can change some of them without affecting the data stored in the table; others might affect the data, so it pays to be cautious about making drastic changes until you have some experience working with Access.

  1. In the Database window, double-click Employees in the Tables pane to open the table in Datasheet view.

    Employees table in Datasheet view

    Tip  Your Table window might be a different size than this one. Notice that any field name that is composed of two words (such as FirstName) has a space between the words, whereas the name you specified in the wizard had no space. Remember this when you are looking at the table later, in Design view.

    Tip  As with other Microsoft Office applications, you can change the size of the window by moving the pointer to a corner and, when the pointer becomes a double-headed arrow, clicking and dragging to expand or reduce the size of the window.

  2. On the toolbar, click the View button to display the table in Design view.

    Employees table in Design view

    In Design view, the top portion of the window contains a list of the table's fields. The Field Name column contains the names you, or the wizard, specified when you created the table. Notice that there are no spaces in the names. The Data Type column specifies the type of data that the field can contain. The Description column can contain a description of the field.

    Tip  You can use field names that include spaces, but this can affect how queries and modules have to be written, so it is best not to do so.

    Notice the Primary Key icon to the left of the EmployeeID field. The value in the primary key field is used to uniquely identify each record; that is, no two records can have the same value in this field. You can take responsibility for entering this value, or you can let Access help you with this chore. When the data type of a field is set to AutoNumber, Access fills this field in every new record with the next available number.

    Tip  If you no longer want the table to have a primary key, select the field designated as the primary key in the top portion of the window, and on the Edit menu, click Primary Key. If you want to assign a different field as the primary key, select that field, and click Primary Key on the Edit menu to toggle it off.

  3. Click in the Data Type cell for the EmployeeID field — the one with AutoNumber in it — and then click the down arrow that appears.

    The cell expands to show a list of all possible data types. Each data type cell contains this list, which you use to set the appropriate data type for each field. The data type setting restricts data entry to that specific type. If you try to enter data that is incompatible with that type, Access rejects it.

  4. Press the ESC key to close the list without changing the data type.
  5. At the bottom of the table window, click in each box in the Field Properties section.

    The number of properties in the Field Properties section varies with each data type. For example, the AutoNumber data type has six properties, four of which have drop down lists from which you can select settings. As you click each property, a description of that property appears in the area on the right.

    Tip  For more information about a particular property, click in its box, and press the F1 key to see the pertinent Access Online Help topic.

    The General tab of the Employees table in Design view

    The Field Size property determines the size and type of value that can be entered in the field. For example, if this property is set to Long Integer, the field will accept entries from –2,147,483,648 to 2,147,483,647. If the data type is AutoNumber, the entries in this field will start with 1, so you could conceivably have over two billion employees before you outgrew this table.

    The Increment setting for the New Values property specifies that Access should use the next available sequential number. The alternative (which you can see by expanding the list for this cell) is Random.

    The Format property determines how data from the field is displayed on the screen and in print; it does not control how it is stored. Some data types have predefined formats, and you can also create custom formats.

    Remember that when you displayed the table in Datasheet view, some of the field names had spaces in them? The way the field names are displayed in Datasheet view is controlled by the Caption property. If there is an entry for this property, it is used in place of the actual field name.

    The Yes (No Duplicates) setting for the Indexed property indicates that the information in this field will be indexed for faster searching, and that duplicate values are not allowed. For the primary key field, this property is automatically set to Yes (No Duplicates), but a field can also be indexed without being a primary key.

    Note  The ability to apply a smart tag to a field is a new feature with Office 2003. See the section Smart tags in this article for more information.

  6. With the EmployeeID field still selected (as indicated by the arrow in the row selector), click in the Format box, and type 000 ( three zeros).

    The ID number generated by Access will now be displayed as three digits. If the number isn't three digits long, it will be padded on the left with zeros.

  7. Click the Photograph field, and change its data type from OLE Object to Text.

    The Table Wizard included the Photograph field in this table and set this field's data type to OLE Object so that you can store a graphic in the field. But you will be storing the file name of a graphic, not the graphic itself, so Text is a more appropriate data type.

  8. Click in the HomePhone field to display the field's properties.

    Field properties of the HomePhone field in the Employees table

    The data type for the HomePhone field is Text, even though the data will be a string of numbers. Because this type of entry can also contain parentheses, dashes, and spaces and is not the type of number that you would use in a calculation, Text is the appropriate data type.

    Looking at the Field Properties section for this field, you can see that fields with this data type have more properties than fields with the AutoNumber data type.

    The Field Size property for a field with the Text data type determines the number of characters that can be entered in the field. If you attempt to enter too many characters, Access displays a warning message, and you won't be able to leave the field until you reduce the number of characters to this many or fewer.

    The Caption property is set to Home Phone. This name will be used at the top of the field's column in Datasheet view. The wizard supplies these descriptive names, but you can change them.

  9. Click in the DateHired field to display the field's properties.

    Field properties of the DateHired field in the Employees table

    The Format property for this field is set to Short Date, which looks like this: 4/21/2003. If a valid date is entered in just about any standard format, such as 21 April 03, this property displays the date as 4/21/2003.

    Note  Exercises in this article that use the short date format assume that the year display is set to four digits (m/d/yyyy). This is set in the Regional and Language Settings dialog box in Microsoft Windows XP. To check or change this on your computer click Start, click Control Panel, click Date, Time, Language, and Regional Options, and then click the Regional and Language Options icon. The process is similar in earlier versions of Windows, but some of the command names are a little different.

    This field also has its Input Mask property set to 99/99/00;0. An input mask controls how data looks when you enter it and the format in which it is stored. Each 9 represents an optional numeral, and each 0 represents a required one. When you move to this field to enter a date in Datasheet view, you will see a mask that looks like this: __/__/__. The mask indicates that the date must be entered in the 4/21/01 format, but as soon as you press ENTER to move to the next field, the date will change to whatever format is specified by the Format property.

    Another interesting property is Validation Rule. None of the wizard-generated tables use validation rules, because the rules are too specific to the data being entered to anticipate, but let's take a quick look at how they work.

  10. Click in the Validation Rule box, and type <Now(). Then click in the Validation Text box and type Date entered must be today or earlier.

    A rule is created stating that the date entered must be before (less than) the current instant in time, as determined by the system clock of the computer where the database is stored. If you enter a date in the future, Access will not accept it and will display the validation text in an alert box.

    Note  The Format, Input Mask, and Validation Rule properties seem like great ways to be sure that only valid information is entered in your tables. But if you aren't careful, you can make data entry difficult and frustrating. Test your properties carefully before releasing your database for others to use.

  11. Click the View button to return to Datasheet view, clicking Yes when prompted to save the table.

    Tip  When you try to switch from Design view to Datasheet view after making changes (and sometimes even if you haven't made any changes), you are presented with an alert box stating that you must save the table. If you click No, you remain in Design view. If you click Yes, Access saves your changes and switches to Datasheet view. If you want to switch views without saving changes that you have made inadvertently, click No, and then click the table's Close button. When Access displays another alert box, click No to close the table without saving any changes.

  12. Enter a future date in both the Birthdate and Date Hired fields.

    The Birthdate field, which has no validation rule, accepts any date, but the Date Hired field won't accept a date beyond the one set on your computer.

  13. Click OK to close the alert box, change the Date Hired value to a date in the past, and then click the Close button to close the Employees table.
  14. In the Database window, click Suppliers, and click the Design button to open the table in Design view.
  15. Delete the Country/Region, PaymentTerms, EmailAddress, and Notes fields by clicking in the row selector and pressing the DEL key.

    Tip  Access alerts you that deleting the EmailAddress field requires deleting the field and all its indexes. Click Yes. (You will see this alert again in step 17; click Yes each time to delete the fields.)

  16. Close the Suppliers table, clicking Yes to save your changes.
  17. Open the Customers table in Design view, and delete the following fields: CompanyName, CompanyOrDepartment, ContactTitle, Extension, FaxNumber, EmailAddress, and Notes.
  18. Click in the CustomerID field, and change the Field Size property from 4 to 5.
  19. Change the following fields and their captions (note that there is no space in the first two new field names, but there is a space between the words in their captions):
    Original field name New field name New caption
    ContactFirstName FirstName First Name
    ContactLastName LastName Last Name
    BillingAddress Address Address
    StateOrProvince Region Region
    Country/Region Country Country

  20. Close the Customers table, clicking Yes to save it.

Manipulate table columns and rows

When you refine a table's structure by adding fields and changing field properties in Design view, you are affecting the data that is stored in the table. But sometimes you will want to adjust the table itself to get a better view of the data. If you want to look up a phone number, for example, but the names and phone numbers are several columns apart, you will have to scroll the table window to get the information you need. You might want to rearrange columns or hide a few columns to be able to see the fields you are interested in at the same time.

You can manipulate the columns and rows of an Access table without in any way affecting the underlying data. You can size both rows and columns, and you can also hide, move, and freeze columns. You can save your table formatting so that the table will look the same the next time you open it, or you can discard your table adjustments without saving them.

In this exercise, we'll look at how we can manipulate the columns and rows in a table. To make the value of table formatting more apparent, the following two illustrations show many records in the Customers table. However, you can add a single record to your Customers table and follow along — just be sure to type a five-character value in the CustomerID field (such as "YOURO," for Rob Young) as a unique identifier for the customer.

  1. Open the Customers table in Datasheet view.
  2. Drag the vertical bar at the right edge of the Address column header to the left until the column is about a half inch wide.

    Customers table in Datasheet view

    The column is too narrow to display the entire address.

  3. Point to the vertical bar between the Address and City column headers, and double-click.

    The column to the left of the vertical bar is the minimum width that will display all the text in that field in all records. This technique is particularly useful in a large table where you can't easily determine the length of a field's longest entry.

  4. On the left side of the datasheet, drag the horizontal bar between any two record selectors downward to increase the height of all rows in the table.

    Increasing the height of rows in the Customers table in Datasheet view

  5. On the Format menu, click Row Height to display the Row Height dialog box.
  6. Select the Standard Height check box, and then click OK.

    The height of all rows is returned to the default setting. (You can also set the rows to any other height in this dialog box.)

  7. Click in the First Name column, and then on the Format menu, click Hide Columns.

    The First Name column disappears, and the columns to its right shift to the left. If you select several columns before clicking Hide Columns, they all disappear.

    Tip  You can select adjacent columns by clicking in the header of one, holding down the SHIFT key, and then clicking in the header of another. The two columns and any columns in between are selected.

  8. To restore the hidden field, on the Format menu, click Unhide Columns to display the Unhide Columns dialog box.

    Unhiding table columns in Datasheet view

  9. Select the First Name check box, and then click Close.

    Access redisplays the First Name column.

  10. Drag the right side of the Database window to the left to reduce its size so that you cannot see all fields in the table.
  11. Point to the Customer ID column header, hold down the mouse button, and drag through the First Name and Last Name column headers. Then with the three columns selected, on the Format menu, click Freeze Columns.

    The first three columns will remain in view when you scroll the window horizontally to view columns that are off the screen to the right.

  12. On the Format menu, click Unfreeze All Columns to restore the columns to their normal condition.

Smart tags

A smart tag appears as a shortcut menu that displays options pertinent to a specific word, field, or type of content. For example, if Word determines that several words you typed might be a person's name, it will place a purple dotted line beneath them. If you move the mouse pointer over the underlined words, Word displays a Smart Tag Actions button. When you click this button, Word displays a list of possible actions that includes sending an e-mail message, scheduling a meeting, and adding to contacts.

Smart tags were introduced as part of Windows XP and were supported in some Office XP programs. With Office 2003, they have been extended to Access.

When you create a table in Access, you can apply one or more smart tags to each field. When information from that field is displayed in a table, form, or query, and the mouse pointer is moved over the text, the Smart Tag Action button is displayed and some action can be taken that is appropriate for the kind of information.

There are not currently a lot of smart tags available for use in Access, but they are being created by third-party developers and made available on the Web.

Key points  

  • Access includes wizards to help you quickly and easily create databases and their objects, such as tables, queries, forms and reports.
  • In Design view, you can modify any object you created with a wizard.
  • Rather than storing all information in one table, you can create several different tables for each specific type of information, such as employee contact information, customer contact information, and supplier contact information.
  • Properties determine what data can be entered in a field, and how the data will look on the screen. In Design view, you can change some properties without affecting the data stored in the table; but changing some other properties might affect the data, so you must exercise caution when modifying them.
  • You can adjust the structure of a table — by manipulating or hiding columns and rows — without affecting the data stored in the table.
  • When you create a table in Access, you can apply one or more smart tags to each field. When information from that field is displayed in a table, form, or query, and the mouse pointer is moved over the text, the Smart Tag Action button is displayed and some action can be taken that is appropriate for the kind of information.
advertisement