ComboBox.HideDuplicates 屬性 (Access)ComboBox.HideDuplicates property (Access)

您可以使用 HideDuplicates 屬性及其值為前一筆記錄相同時隱藏報表上的控制項。You can use the HideDuplicates property to hide a control on a report when its value is the same as in the preceding record. 可讀寫的 BooleanRead/write Boolean.

語法Syntax

運算式HideDuplicatesexpression.HideDuplicates

_運算式_代表**ComboBox** 物件的變數。expression A variable that represents a ComboBox object.

註解Remarks

HideDuplicates 屬性只適用於報表上的控制項 (核取方塊、 下拉式方塊、 清單方塊、 選項按鈕、 選項群組、 文字方塊、 切換按鈕)。The HideDuplicates property applies only to controls (check box, combo box, list box, option button, option group, text box, toggle button) on a report.

HideDuplicates 屬性使用下列設定值。The HideDuplicates property uses the following settings.

設定Setting 描述Description
TrueTrue 如果控制項的值或資料與前一筆記錄相同,就會隱藏這個控制項。If the value of a control or the data it contains is the same as in the preceding record, the control is hidden.
FalseFalse (預設值) 無論前一筆記錄的值為何,都可以看見這個控制項。(Default) The control is visible regardless of the value in the preceding record.

DefaultValue屬性不會套用至] 核取方塊、 選項按鈕或切換按鈕控制項選項群組中時。The DefaultValue property doesn't apply to check box, option button, or toggle button controls when they are in an option group. 不過,它沒有適用於選項群組本身。However, it does apply to the option group itself.

您可以設定 HideDuplicates 屬性只能在報表設計檢視中。You can set the HideDuplicates property only in report Design view.

您可以使用 HideDuplicates 屬性使用詳細資料區段而不是群組首和詳細資料區段建立群組的報表。You can use the HideDuplicates property to create a grouped report by using only the detail section rather than a group header and the detail section.

範例Example

下列範例會傳回CategoryName文字方塊的HideDuplicates屬性設定,並將值intCurVal變數。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 
intCurVal = Me!CategoryName.HideDuplicates

支援和意見反應Support and feedback

有關於 Office VBA 或這份文件的問題或意見反應嗎?Have questions or feedback about Office VBA or this documentation? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.