Create a table by entering data in a datasheet

Create a table by entering data in a datasheet

  1. If you haven't already done so, switch to the Database window. You can press F11 to switch to the Database window from any other window.

  2. Click Tables under Objects, and then click New on the Database window toolbar.

  3. Double-click Datasheet View. A blank datasheet is displayed. The default column names are Field1, Field2, and so on.

  4. Rename each column you will use: double-click the column name, type a name for the column following Microsoft Access object-naming rules and then press ENTER.

  5. You can insert additional columns at any time: click in the column to the right of where you want to insert a new column, and then on the Insert menu, click Column. Rename the column as described in step 4.

  6. Enter your data in the datasheet.

    Enter each kind of data in its own column (each column is called a field in Microsoft Access). For example, if you are entering names, enter the first name in its own column and the last name in a separate column. If you are entering dates, times, or numbers, enter them in a consistent format so that Microsoft Access can create an appropriate data type and display format for the column. Any columns you leave empty will be deleted when you save the datasheet.

  7. When you've added data to all the columns you want to use, click Save on the toolbar to save your datasheet.

  8. Microsoft Access asks you if you want to create a primary key. If you haven't entered data that can be used to uniquely identify each row in your table, such as part numbers or ID numbers, it's recommended that you click Yes. If you have entered data that can uniquely identify each row, you can specify this field as your primary key.

    How?

Microsoft Access will assign data types to each field (column) based on the kind of data you entered. If you want to customize a field's definition further — for example, to change its data type, or define a validation rule, use Design view.

Note   In addition to renaming and inserting columns, you can delete or reorder columns at any time, before or after saving your new datasheet. For information on deleting a column, click . For information on reordering columns, click .