Bradley University Skip repetative navigation
 

Microsoft Access

Tables

A table is a collection of data about a specific topic, such as students or contacts. Using a separate table for each topic means that you store that data only once, which makes your database more efficient, and reduces data-entry errors.

Tables organize data into columns (called fields) and rows (called records).


Create a table in Design View

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.    

Double-Click "Create table in Design view".
(DESIGN VIEW)


Define each of the fields in your table.

Field Name - Enter the categories of your table.

Data Type: - Enter the type you want for you categories.

Description - Enter text that describing the field. (optional).



  • Primary Key

    One or more fields (columns) whose value or values uniquely identify each record in a table. A primary key does not allow Null values and must always have a unique value. A primary key is used to relate a table to foreign keys in other tables.

    NOTE: You do not have to define a primary key, but it's usually a good idea. If you don't define a primary key, Microsoft Access asks you if you would like to create one when you save the table.

     

      To do this, simply select the Soc Sec # field and select the primary key button.

      After you do this, Save the table.


    Switching Views

    To switch views form the datasheet (spreadsheet view) and the design view,
    simply click the button in the top-left hand corner of the Access program.

    Datasheet View Design View

    Displays the view, which allows you to enter raw data into your database table.

    Displays the view, which allows you to enter fields, data-types, and descriptions into your database table.

    Entering Data Directly

    Click on the Datasheet View and simply start "chugging" away by entering the data into each field.



    Manipulating Data

    Adding a new row
    Drop down to a new line and enter the information.

    Updating a record
    Select the record and field you want to update, and change its data with what you want.

    Deleting a record
    Select the entire row and hit the Delete Key on the keyboard.



    Advanced Table Features

    Assigning a field a specific set of characters

    Example) Making a Social Security Number only allows 9 characters.

    Switch to Design View.
    Select the field you want to alter.
    At the bottom select the General Tab.
    Select Field Size.
    Enter the number of characters for this field.


    Formatting a field to look a specific way

    (HINT: You do not need to assign a field a specific set of characters if you do this)

    Switch to Design View.
    Select the field you want to format.
    At the bottom select the General Tab.
    Select Input Mask Box and click on the ... button at the right.
    Select Phone Number option.

     

    Click on Next

    Leave !(999) 000-0000 the way it is. This is a default.

    Click Next

    Select which option you want it to look like

    Click Next

    Click Finish


    Selecting a value from a dropdown box with a set of values that you assign to it.

    Switch to Design View.
    Select the field you want to alter.
    At the bottom select the Lookup Tab.
    In the Display Control box, select Combo Box.
    Under Row Source Type, select Value List.
    Under Row Source, enter the values how you want them displayed, separated by a column. (Auburn, Bay City, Flint, Midland, Saginaw)

    NOTE:This will not alphabetize them for you, so you will have to do that yourself. It should look something like this:


    Select in the datasheet view and you should see the change when you go to the city field.

    Go back to the top of the page Go back