Office 2019 For Dummies
Book image
Explore Book Buy On Amazon
After you create an Access database from scratch or from a template, you may need to modify it by giving each field a descriptive name, defining the size of each field, or adding and deleting a field. With Access 2019, these tasks are easier than ever.

Naming a field in Access 2019

If you create a database from scratch, Access displays generic field names such as Field1. If you didn't modify these generic field names when you created your database, you can change names later. If you create a database from a template, you’ll see the descriptive field names, but you may still want to rename the fields to something else.

To rename a field in Access, follow these steps:

  1. In the All Access Objects pane on the left of the screen, double-click the table that contains the fields you want to rename. Access displays the Datasheet view (which resembles an Excel spreadsheet) of your database.
  2. Double-click the field (column head) that you want to rename. Access highlights the column heading.
  3. Type a new name for your field.
  4. To rename other fields, repeat Steps 2 and 3.
  5. When you're finished, press Enter.

Adding and deleting a field in Access

Sometimes you may need to add a field to make room to store new information. At other times, you may want to delete a field that you don’t really want after all.

It’s usually best to add and delete fields when creating and designing a database, before you start storing data such as names and addresses. If you add fields after you’ve stored data, you’ll wind up with empty fields in existing records.

To add a field to an Access database table, follow these steps:
  1. Click the downward-pointing arrow that appears to the right of the Click to Add heading. A menu appears.
  2. Choose the type of field you want to add, such as Currency or Short Text. Access inserts your field and gives it a generic name like Field3.
To delete a field from an Access database table, follow these steps:
  1. Right-click the field (column head) you want to delete. Access highlights the entire column in your database table and displays a pop-up menu.

    edit Access database Right-click a field to modify it.
  2. Click Delete Field.If you have stored data in that field, a dialog box appears, asking whether you want to permanently delete all the data in the field.

    If you delete a field, you also delete any data that may be stored in that field. Depending on how much data you have stored, you can wipe out a lot of information by deleting a single field, so be careful.

  3. Click Yes (or No). If you click Yes, Access deletes your chosen field.

Defining the type and size of a field in Access

The data type of a field defines what kind of data the field can hold (numbers, text, dates, and so on), and the size of a field defines the amount of data the field can hold (no numbers larger than 250 digits, any text string with fewer than 120 characters, and so on).

The purpose of defining the type and size of a field is to make sure that you store only valid data in that field. If a field is meant to store names, you don’t want someone typing a number. If a field is meant to store a person’s age, you don’t want the field to accept negative numbers.

To define the type and amount of data a field can store in Access, follow these steps:

  1. Click the Home tab.
  2. In the All Access Objects pane on the left of the screen, double-click the table that contains the fields you want to define.Access displays the Datasheet view of your table.
  3. Click the column heading of the field you want to define. Access highlights the entire column.
  4. On the Ribbon interface, click the Fields tab that appears under the Table Tools heading. The Fields tab displays options for modifying your field.
  5. In the Formatting group, click the arrow that appears to the right of the Data Type combo box.A pull-down menu appears, listing all the types of data you can define to store in a field.

    modify Access database You can choose a specific data type to make sure that a field stores the correct information.
  6. Choose a data type, such as Number, Text, or Date/Time.Depending on the data type you choose, you can choose additional options by clicking in the Format combo box.

If you change a field's data type, you may lose any existing data stored in that field.

About This Article

This article is from the book:

About the book author:

Wallace Wang is the bestselling author of more than 50 computer books, with over three million of his For Dummies books in print. They include numerous versions of Office For Dummies as well as Beginning Programming For Dummies. When not playing with computers, Wallace splits his time between teaching, writing, game designing, screenwriting, and stand-up comedy.

This article can be found in the category: