TOC: Background | Creating a Custom Form for a Custom Interaction
Customizing Forms for Custom Interactions
When you import a custom table, Metrix automatically creates a form so you can input Interaction data into the new table. By default, the form is shown as a simple "datasheet" that displays the custom table fields in a grid, with a columns for each field and rows for multiple records.
However, you can modify this default form so that it better meets your needs. Instead of viewing the fields as a datasheet, you can use Microsoft Access's built-in form-design capability to switch to a more conventional form view, displaying one record at a time. When using a datasheet, you will configure the form's properties for "datasheet view". When using a conventional form, you will use "form view".
Use the datasheet view when you expect to enter relatively simple, repetitive information. For example, if you are keeping track of hours that a volunteer has worked, the datasheet view is appropriate because you would want to view a limited number of columns ("time in", "time out", "hours worked") but a large number of rows (one for each day the volunteer worked). This view will allow you to enter and review such information very efficiently.
Use form view when you have a relatively large amount of information to capture for each record, especially when this information is captured in various formats (i.e. a date, a drop-down list, and a long descriptive text field). Properly designed, the form will display this information in much clearer way than a datasheet would.
You can also use a continuous form view, which will display a scrollable series of identical forms, showing multiple records. This is useful for an Interaction that captures a sequence of events, or multiple choices from a list.
Back To Top
Creating a Custom Form for a Custom Interaction
- Close Metrix.adp and open interactsql.adp. This is the database file where all custom tables are kept.
The default location for interactsql.adp is C:\Program Files\fcny\Metrix\Server.
- In the Microsoft Access database window, find the custom form that Metrix created when you imported your custom table.
Its name will have the prefix "frmUse" followed by the name of your custom table. For example, if your custom table was called tblCustomGrantsRevisions, the custom form associated with that table will be frmUsetblCustomGrantsRevisions.
- Open the form in Design View.
Figure: Custom Table Form in Design View
- Decide what the default view for the form will be:
- When you have decided which view is best, open the form's property sheet and change Default View to reflect your choice. Make sure to set the corresponding Allow [ _____ ] view setting to "Yes." For example, if you set Default View to "Single Form", you must also set Allow Form View to "Yes".
- Make formatting changes to the form. These steps are optional, but they will improve the appearance and usability of the form when it appears in Metrix:
- The default Back Color value in the Details section of the form is "16777215". This matches the existing layout elements in Metrix.
- Set the dimensions of the form to 5 inches wide by 3 inches tall (or less). Forms taller than 3 inches will work, but they will require a vertical scroll bar.
- To help visually differentiate your form from the Metrix layout elements next to it, add a vertical line on the left side of the form. Set its Border Width to 2 points.
- Set the Dividing Lines property to "no".
- Set Record Selectors to "yes" if you chose "continuous forms" as your default view. In Metrix, record selectors on custom forms are mainly used for deleting records. If your form provides another clear method for deleting records (such as navigation buttons), you may wish to omit record selectors.
- Set the Navigation Buttons property to "yes" if you chose "single form" for your default view and if more than one record per Interaction is permissible.
- Adjust the position of controls on the form so there is padding around the edges. This will help distinguish the controls from other Metrix layout elements.
- Check to see that the following fields are in the footer, and then set the footer's "Visible" property to "No":
- Set the header's Visible property to "No," unless you are using continuous form view to show a single-field drop down and want to label that drop-down from above.
- When you finish laying out the form and adjusting all the properties, preview the form in form view, just as you would in any Microsoft Access database.
You will receive an error message ("invalid reference to parent property"). This should be ignored and you will not see the error when you are viewing the form in Metrix. This error comes about because the Interaction forms are designed to be viewed as subforms and here you will be viewing them without their parent form.
- Close interactsql.adp.
Figure: A Custom Form in Action
- To see your new form in action, open the Metrix database as you normally would and create a new Interaction of the type that uses the form you just modified.
For information on customizing forms for more complex Interactions, see Customizing a Form to Show Data from Parent-Child Custom Tables and Customizing a Form to Show Multiple Interaction Records.
Back To Top