MS-Access / Getting Started

Creating a Table with Design View

Access provides several methods for creating a table. The ideal way to create a table in Access is with the Design view. Why? The Design view allows for a compact work area so you can add fields, reposition fields, and assign attributes easily.

Imagine that the Human Resources department asks you to create a simple list of employees in Access. To create a table in the Design view, go to the application ribbon and select the Create tab and then the Table Design button. This opens an empty table called Table1 in Design view.

Adding Fields

The idea here is to create a list of fields that describe employee attributes. Among the more common attributes in this situation are the following: EmployeeNumber, FirstName, LastName, Address, City, State, Zip, and HourlyWage. You begin by entering the names of the columns going down the list. When you have entered all of the required column names, your dialog box should look like Figure below.

Enter the Column Names

Adjusting Data Types

As you entered the field names, the data types defaulted to the most common data type, Text. You now want to set the data type for each field or at least change the data type of each non-text field.

Choosing the correct data type for the first field, EmployeeNumber, may be initially confusing. With the word Number in the field, you might think that Number would be the logical choice for the data type. Actually, the rule of thumb is that if the field will not be used in a calculation, it is best to set its data type to Text. Because there is no logical reason to perform a calculation on an employee's EmployeeNumber, the EmployeeNumber data type should remain Text. Another reason for using the Text data type forthe field EmployeeNumber is that there could be a need to use alphabetic or other characters in the field.

As you go through the field names, it should be fairly obvious that you will want to set all of the fields to Text except for HourlyWage. This field will almost certainly be used in calculations, and it will represent a monetary value, so you should change the data type to Currency.

Now you can save and name your table. Click the Office Icon and select Save As. This opens the Save As dialog box where you will give your newly created table an appropriate name like Employees or EmployeeMaster. Keep in mind that at this point, this table has no data in it. You can begin entering employee information directly into the table through the Datasheet view. For tables with a small number of records, you can enter your records manually. However, most sets of data are quite large, so other techniques of bringing data into Access are introduced later in the tutorial.

NOTE: When you save a table, you may be prompted to set a primary key. Primary keys are explained later. In most cases, Access will try to choose one for you. It's generally good practice to accept Access' recommendation to create a primary key if you do not already have one on mind.

[Previous] [Contents] [Next]