To control subform and subform set breaks by using conditional statements
the capability to create customized conditional breaks for repeating
subform objects. As opposed to paginating in response to data overflow,
conditional breaks allow you to manually control how a subform breaks in
a form based on a series of checks called conditional statements.
Through the conditional statements, you can verify data for a
field within a repeating subform against previous instances of that
field. The repeating subform can then be broken in response to a
change in the data supplied to the field.
For example, on a telephone bill, you could break a repeating
subform in response to changes in the field that stores the date
of each billing entry. The telephone bill could then be visually
broken down by date, making it easier for a user to read.
In addition to specifying a breaking condition, you can also
specify a leading or trailing subform and indicate where to place
the next instance of the repeating subform in the form.
Select a subform or subform set.
In the Object palette, click the Pagination tab.
Click Edit and then click Add to insert
a new conditional break list item.
Select a scripting language from the Language list. The conditional
break condition statement is created using the scripting language
In the Run At list, select where you want the conditional
break to execute.
Click Insert Sample Expression and
select the form design object within the subform to use as the comparison
field for the conditional break. Alternatively, you can enter your
own conditional statement in the field. To correctly evaluate as
a conditional break, however, any user-defined conditional statements
must evaluate to either true or false.
Conditional statements that evaluate to true are
Use one of these options to specify when you want the subform
object to break:
Select Before to insert a break immediately
before the current instance of the subform is inserted into the
Select After to insert a break immediately after the current
instance of the subform is inserted into the form.
In the To field, select where you want to place the remaining
occurrences of the broken subform.
In the Trailer and Leader lists, select trailer and leader
subforms to use for the current conditional break, if any.
Repeat steps 2 to 8 for each conditional break that you want
to include for the selected subform.
Click OK when you have finished adding entries to the list.
you create all of your conditional break entries, you should review
the order in which they appear in the Edit Conditional Breaks dialog
box. Designer processes the conditional breaks specified in the
Edit Conditional Breaks dialog box in sequential order from top
to bottom. Each conditional break for which the conditional statement
evaluates to true is executed.
Use the Up and
to move individual conditional break list entries into the preferred