HideDuplicates Property

Applies To

Check Box Control, Combo Box Control, List Box Control, Option Button Control, Option Group Control, Text Box Control, Toggle Button Control.

Description

You can use the HideDuplicates property to hide a control on a report when its value is the same as in the preceding record. For example, on a report listing suppliers and their products, each supplier’s name can appear once for each group of products, rather than once for each product.

Note The HideDuplicates property applies only to controls (check box, combo box, list box, option button, option group, text box, toggle button) on a report.

The property doesn’t apply to check boxes, option buttons, or toggle buttons when they appear in an option group. It does apply to the option group itself.

Setting

The HideDuplicates property uses the following settings.

Setting

Description

Visual Basic

Yes

If the value of a control or the data it contains is the same as in the preceding record, the control is hidden. (To determine the control’s value, see the Remarks section.)

True (-1)

No

(Default) The control is visible regardless of the value in the preceding record.

False (0)


You can set this property using the control’s property sheet, a macro, or Visual Basic.

You can set the HideDuplicates property only in report Design view.

Remarks

You can use the HideDuplicates property to create a grouped report using only the detail section rather than a group header and the detail section.

Example

The following example returns the HideDuplicates property setting for the CategoryName text box and assigns the value to the intCurVal variable.


Dim intCurVal As Integer= Me![CategoryName].HideDuplicates