Enhance the form

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

In this exercise you:

  • Add a title

  • Change the border for data

  • Move the buttons

  • Add a report

Add a title

  1. Move the pointer to an unused area of the form and click.

    This causes the Properties view to display the form's properties.

  2. Type Maintain Contact Information in the Title box.

    The title does not display now. When you run the form, the title displays.

Change the border for data

Now you change the border for all data values. This improves the form's appearance. You use lasso select to select the data.

  1. Move the pointer near the bottom of the data and on the right.

  2. Press and hold the left mouse button and drag diagonally to the left and up until the box (the lasso) touches all the data.

  3. Release the mouse button.

    All the objects inside the box are selected. Black boxes display in all the corners.

  4. Select Lowered or whatever value you want from the Border drop-down list on the General page in the Properties view.

    All the areas on the form used to display data values now have your selected border.

Move the buttons

Now you move the buttons to make room for the report you are about to add.

  1. Select a button.

    You can use lasso select or click one. Small black boxes in the corners mean it is selected.

  2. Drag the button to the top of the form.

    Select and drag the other two buttons until your form looks like this.

Now the buttons are near the top of the form. There is more room for the report you are about to add.

Add a report

Now you add a report to provide information when you are working with the form. You can scroll in the report while you are filling out the form for a new contact. This means, for example, that you can look up an area code or zip code if it is already present for another contact.

  1. Select Insert>Report from the menu bar.

    Move the pointer into the workspace.

    Your next click positions the report that you are adding to the form.

  2. Move the pointer to the empty space on the right part of the form and click.

    Four dots marking the corners of the box that will hold the report display on the form.

    Now you use the Properties view to specify a few things about the report. First you are going to select the report whose contents display in the box.

  3. Click the Browse button (the button with three dots on it) next to the DataObject field on the General page in the Properties view.

    The Open dialog box displays. It lists the reports (DataWindows) in tutor_im.pbl, the current library.

  4. Scroll the list of reports, select contactgrid, and click OK.

    The contactgrid report displays in the form, and its name displays in the DataObject field in the Properties view.

    Next you specify that the report is to have the StyleBox border and scroll bars.

  5. Make sure the BorderStyle selection is StyleBox.

    Select the HScroll Bar, VScroll Bar and Border check boxes.

    When you run the form, the report displays as a window with horizontal and vertical scroll bars. This gives you flexibility in looking at data while working on the form.

  6. Resize the report to show more data.

    To resize, move the pointer near an edge until the pointer becomes a double-pointed arrow. Then press the left mouse button, hold, and drag.

    When you finish resizing, the report should look something like this.