TOC: Displaying Interactions with Multiple Records | Displaying Multiple Records in Datasheet View | Displaying Multiple Records in Form View | Displaying Multiple Interactions on a Single Form
Customizing a Form to Show Multiple Interactions
Displaying Interactions with Multiple Records
It is likely that you will need to setup Interactions that allow for multiple responses. Some examples of situations where you would want to record multiple records under a single Interaction would be:
- Attendance at classes, workshops or events
- Skills and interests
- Household or emergency contact data
When you create this type of Interaction, there are three options as far as displaying the data in Metrix:
- The datasheet view
- Single form views
We will show you how to use a datasheet view and a continuous form for displaying multiple language records for contacts. For more information on how the data was formatted for Metrix, please see Building Complex Custom Interactions with Existing Data.
For this example, we have a table, tblCustomLanguageSpoken, which also includes a look-up table for the language, tlkpCustomLanguage . The lookup table was associated with the Language field in tblCustomLanguageSpoken.
Note: When customizing forms, you will be working directly with the database interactsql.adp. You will be using the form design tools of Access to build forms.
Back To Top
Displaying Multiple Records in Datasheet View
When you import a custom table, Metrix automatically creates a form for holding the Interaction data. By default, the form that is generated is a simple "datasheet" that displays the custom table fields in a grid, with a column for each field and rows for multiple records.
This is how the form will appear by default:
Figure: Form in Datasheet View
If it is incorporated in the Interaction at this point, this is how it will look:
Figure: Datasheet Form Displayed in Interaction
A datasheet form can be completely sufficient for entering and viewing data. You may, however, want to customize it in form view for easier data entry,.
Back To Top
Displaying Multiple Records in Form View
As mentioned earlier, when customizing forms for Interactions, you will be using Microsoft Access form design tools. If you are not familiar with Access and want to create custom forms, we recommend that you enroll in a course that will provide you with the basics of form design.
Again, in order to work with the form you will need to close Metrix.adp and openinteractsql.adp.
When tables are imported into Metrix through devmodule130, the forms are assigned corresponding names. For a table that was named tblCustomLanguageSpken, the form would be frmUseTblCustomLanguageSpoken. To modify a form, open it in Design View and make the necessary changes.
Note: When viewing a form in interactsql.adp, you may see an error message stating "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 forms.
- Open the form in Design View.
- Decide what the default view for the form will be:
- Datasheet: This is the default. Your form will look like a spreadsheet.
- Single Form: This will display a more conventional form, showing one record at a time. This is a good choice if you are tracking multiple fields of related static information, but works well for Interactions with multiple records.
- Continuous Forms: This 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.
- When you have decided which view is best, access the form's property sheet and change Default View to your 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".
Figure: Working on a Form for a Custom Interaction in Design View
- Make formatting changes to the form.
Note: These steps are optional, but they will improve the appearance and usability of the form when it appears in Metrix:
- Set the dimensions of the form to 6 inches wide by 3 inches tall (or less).
Forms taller than 3 inches will work, but they will require a vertical scroll bar.
- 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".
- 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.
- Move the following fields to the footer, and set the footer's "Visible" property to "No":
- When you are finished, close interactsql.adp, open Metrix.adp and view the Interaction.
If this is the first time you are viewing the Interaction, you may need to specify visible fields in the Interaction Set-up form. If you are using continuous form view or single form view you will only need to specify one field from your table. The fields you have placed on your form will all show.
Figure: Viewing the Custom Form for the Interaction
Back To Top
Displaying Multiple Interactions on a Single Form
It is likely that you may want to combine data from several different custom tables on the same form and in the same Interactions. These tables do not necessarily need to have a parent-child relationship with one another (for more information on setting up this type of form, please see Customizing a Form to Show Data from Parent-Child Custom Tables). Rather, you can place several custom tables on the same form if the data is related thematically, or if is likely that data would be entered at the same time.
In this next example, we will add Language Spoken, but as a subform for a table designed to track Volunteer Profile data.
Once the tables have been created and imported into interactsql.adp, you are ready to modify the forms. In this case, the form for the Volunteer Profile (frmUseCustomVolunteerProfile) will serve as the main form for the Interaction and the data from (tblCustomLanguageSpoken) will be included as a subform.
- When you add the form for the language data (frmUseCustomLanguageSpoken), you will need to link the form so that the correct contact and Interaction records are associated.
Figure: Linking a Subform to Display Multiple Custom Tables
- The following form fields need to be linked on both:
Note: Since these are not parent-child tables, we do not need to have a foreign key field in tblLanguageSpoken linked to the primary key in tblVolunteerProfile. These data tables are independent, and are only related by being part of the same Interaction.
- Make whatever formatting changes you wish to the form or subform.
- Repeat these steps for any additional forms that you wish to associate with this Interaction.
- When you are finished, view the form in Metrix.
Figure: Viewing the Interaction with Multiple Custom Tables
Back To Top