Steps in creating a form of an existing database table

 

Step 1: Select fields.

You have a choice of two categories of suggested tables: Business and Personal. Each category contains its own suggested tables from which to choose. Each table has a list of available fields. We will use the CD-Collection Sample table in the Personal category to select the fields we need.

  1. CategorySelect Personal. The Sample Tables drop down list changes to a list of personal sample tables.
  2. Sample Tables: Select CD-CollectionThe Available fields window changes to a list of available fields for this table.
  3. Selected Fields: Using the > button, move these fields from the Available fields window to the Selected fields window in this order: Collection ID, Album Title, Artist, Date Purchased, Format, Notes, and Number of Tracks.
  4. Selected Fields from another sample table. Click Business as the Category. Select Employees from the dropdown list of sample tables. Use the > button to move the Photo field from the Available fields window to the Selected fields window. It will be at the bottom of the list directly below the Number of Tracks field.
  5. If a mistake is made in the order as listed above, click on the field name that is in the wrong order to highlight it. Use the Up or Down arrow on the right side of the Selected Fields list (see Figure 3) to move the field name to the correct position. Click Next.
Figure 3: Order of fields.
Documentation caution.pngBelow the Selected Fields list are two buttons: one with a +, and one with a -. These buttons are used to add or to remove fields from the Selected Fields list. Be careful when using these buttons until well acquainted with how to create tables (Figure 3).

Step 2: Set field types and formats.

In this step you give the fields their properties. When you click a field, the information on the right changes. You can then make changes to meet your needs. (See Figure 4.) Click each field, one at a time, and make the changes listed below.

  • CollectionID: Change AutoValue from No to Yes.
  • AlbumTitle:
  • Entry requiredIf all of your music is in albums, change Entry required to Yes. Otherwise, leave Entry required as No.
  • Length: Unless you have an album title that exceeds 100 characters in length counting the spaces, do not change the length.
  • Artist: Use the Default setting. And since music has authors, set Entry Required to Yes.
  • Date PurchasedLength: default setting. Entry required should be No. (You may not know the date.)
  • Format: Only change the Entry Required setting: from No o Yes.
  • Notes: No changes are required.
  • NumberofTracks: Change the Field Type to Tiny Integer[TINYINT]. Your allowable number of tracks will be 999.
  • Photo: Use the default settings. When you have finished, click Next.

Step 3: Set primary key.

  1. Create a primary key should be checked.
  2. Select option Use an existing field as a primary key.
  3. In Fieldname drop down list, select CollectionID.
  4. Check Auto value if it is not already checked.
  5. Click Next.

Step 4: Create the table.

  1. If desired, rename the table at this point. If you rename it, make the name meaningful to you. For this example, make no changes.
  2. Leave the option Insert data immediately checked.
  3. Click Finish to complete the table wizard. Close the window created by the table wizard. You are now back to the main window of the database with the listing of the tables, queries, forms, and reports.


Comments