Enhance the form

Note

In this exercise you:

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.

    Shown at left is the Layout view for the contact _ maintenance form, with labeled fields for ID, Last Name, First Name, and so on. At right is the General tab page of the Properties view with a drop down labeled Color and a Title field with the circled text " Maintain Contact Information. "

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.

    Shown is the Layout view for the contact _ maintenance form, with labeled fields for ID, Last Name, First Name, and so on. At bottom right is a large black dot that forms  the right bottom corner of a large rectangle superimposed on all the fields.
  3. Release the mouse button.

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

    Shown is a form with a series of labeled text fields for items such as ID, Last Name, First Name, and Job Role. Within the fields, the names of the objects such as contact _ last _ name are displayed where the actual data will appear. The box around every object has black boxes at its corners to show that it has been selected.
  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.

    Shown is the contact _ maintenance form. At right is the General tab page of the Properties view with a Border drop-down list offering choices such as No Border, Shadow Box ( 1 ) , and Box ( 2 ). The value Lowered ( 5 ) is selected.

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.

    Shown is a form with a series of labeled text fields on the left for items such as ID, Last Name, First Name, and Job Role. Within the fields, the names of the database columns such as contact _ last _ name are displayed where the actual data will appear. Across the top right side are buttons labeled Add a contact, Delete a contact, and Save changes.

    Now 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.

    Shown is the Layout view of the contact _ maintenance  form with a series of labeled text fields at left for items such as ID, Last Name, First Name, and Job Role.  Across the top right side are buttons labeled Add a contact, Delete a contact, and Save changes. Under them are four dots forming the corners of a large box that is circled.

    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 (DataWindow® objects) in tutor_im.pbl, the current library.

    Shown is the Open dialog box. At top is a Data Windows field displaying the name of the report attrib _ birthdays, which is selected from a drop down list of reports below it. Next is a Comments field and then a Library field that shows the path to the selected library, tutor _ i m dot pibble.
  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.

    Shown are the Layout and Properties views for the contact _ maintenance form. Part of the contact grid report displays on the right side of the form in the layout view. It has columns labeled ID and Last Name. On the far right of the screen, in the Properties view, the report name contact grid displays in the Data Object field at the top of the General tab page.

    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.

    Shown are the Layout and Properties views for the contact _ maintenance form. Part of the contact grid report displays on the right side of the form in the layout view. It has columns labeled ID and Last Name, and vertical and horizontal scroll bars. On the far right side of the screen, in the Properties view on the General tab page, the check boxes for H Scroll Bar, V Scroll Bar, and Border  are checked, and a Border Style drop down shows the entry Style Box !.

    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. Align the left edge of the report with the Add a Contact button.

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

    Shown is the Layout view for the contact _ maintenance form. An expanded contact grid report displays on the right side of the form. It has columns labeled ID, Last Name, First Name, and Job Role, and vertical and horizontal scroll bars.