Use the form to update the database

Where you are

   Create the basic form

   Preview (run) the form

   Save the form

   Add buttons to the form

   Enhance the form

>   Use the form to update the database

Now you use the form to add a new contact to the database.

  1. Click the Run button.

    Your finished form displays with data in place. The report on the form gives you a way to see all your contact data.

  2. Click the Add a contact button in the form.

    An empty form displays. You use this form to enter a new contact.

    The cursor is in the Id box, but you do not know the next available number. You look in the report to see what number was used last.

  3. In the report window, use the scroll bar to scroll down to the last row of the report and check the value in the Id column.

    If the data has not been changed since installation, the value is 60, so the next available number is 61.

  4. Click the Id column and type 61.

  5. Press Tab and type Carter for Last Name.

    Press Tab and type Jimmy for First Name.

    Press Tab.

    At this point you are on the Job Role box. In this box you cannot type. You must select a job role from a list of possible ones.

    In the Database painter, the column was defined to be associated with a DropDownListBox edit style. The extended attribute system tables store this and other information about data.

  6. Click the down arrow on the drop-down list to display the choices.

  7. Select Marketing.

  8. Press Tab and type Peanut Way for Street.

  9. Press Tab and type Atlanta for City.

  10. Press Tab and type G to select GA for State (another drop-down list).

  11. Press Tab.

    To determine what to enter for Zip, scroll the report until you find another Atlanta entry.

    Then click the Zip box in the form and type the zip code you see in the report.

  12. Press Tab and type 4045557833 for Phone.

    Notice that you type only the digits. The form formats the phone number. An Edit Mask edit style was defined for this column to handle the formatting. This edit style is stored in the extended attribute system tables.

  13. Press Tab and type 4045554291 for Fax.

    This is what your screen should look like now.

  14. Click the Save changes button in the form to update the database with the new contact.

    The database is updated.

    Note that the report always displays the information from the database when you start running the form. If you update the database, the report does not show the updates. To update the report, you return to the workspace and rerun the form.

  15. Click the Close button in the PainterBar to return to the Form painter workspace.

  16. Click the Run button again and scroll the report to the 61st row in the report.

    Notice that your report has been updated.

  17. Click the Close button in the PainterBar to return to the Form painter workspace.

  18. Select File>Close from the menu bar.

    If you have not already saved the current version of the form, you are prompted to save changes.

  19. Click Yes.

    The Form painter closes.