Binding Controls to Fields

A form usually has two pages: compose and read. You use the compose page to input or post data to a public folder (or send it to a server), and the read page to read what has already been posted.

Controls display information on the form's compose page or read page. A control can be bound to a field (a space in an on-screen form where a user can enter information).

When two controls, one each on the form's compose and read pages, contain the same piece of information, you can link the two controls by binding them to the same field. The two controls need not be of the same type. The Overall Rating drop-down list box on the compose page is associated with the Overall Rating text box on the read page by binding both controls to the Overall Rating field. Controls need not be bound to fields; for example, labels and images that contain static information are usually not bound to fields.

Controls Bound to Custom Fields

The custom fields created for the LitCrit Outlook form are listed in the following table.

Field name Compose page control Read page control
AuthName txtAuthor txtAuthor
Clarity Rating cmbClarity lblClarity
CritiqueText txtMessage txtMessage
Job Relevance cmbJob lblJob
Overall Rating cmbOverall lblOverall
Tech Level cmbTechnical lblTechnical
Title txtTitle txtTitle

Controls Bound to Standard Fields

The book club's LitCrit Outlook form uses three standard fields (MAPI properties on the form) from the IPM.Post message class, the Subject, Sent, and From fields. Binding controls to standard fields allows you to leverage their built-in functionality. For example, binding the txtCritique control, which contains the critique title, to the standard Subject field instead of to a custom field allows the contents of txtCritique to appear as the caption in the title bar on the LitCrit form. Using the Subject field in this way auto-fills the subject on the message with the critique title when you choose to reply to the critique. The critique date uses the Sent field, which causes the date to be filled in using your selected date format. The From field contains the first and last names of the reviewer.

Standard fields and controls on the LitCrit Outlook form are listed in the following table.

Field name Compose page control Read page control
From   txtReviewer
Sent txtCritiqueDate
Subject txtCritique txtCritique