Access) (ToggleButton.TripleState 屬性

使用 TripleState 屬性來指定指定的控制項如何顯示 Null 值。 可讀寫的 Boolean

語法

運算式TripleState

表達 代表 ToggleButton 物件的變數。

註解

Null 屬性使用下列設定值。

設定 描述
True 控制項會迴圈查看 [ ]、[ ] 和 [ Null] 值 的狀態。 當控制項的 Value 屬性設定為 Null時,控制項會呈現灰色 (灰色) 。
False (預設) 控制項會迴圈查看 [ ] 和 [ 否] 值的狀態。 Null 值會顯示為 [沒有] 值。

這個屬性可以在任何檢視中設定。

範例

下列範例會顯示一則訊息,詳細說明frmOperations表單上名為Check1的核取方塊狀態。

Dim strTripleState As String 
 
strTripleState = Forms.Item("frmOperations").Controls.Item("Check1").TripleState 
 
Select Case strTripleState 
 Case True 
 MsgBox "For Check1, TripleState = " & strTripleState & _ 
 ". The control will cycle through states for Yes, No, " & _ 
 "and Null values. The control appears dimmed (grayed) " & _ 
 "when its Value property is set to Null." 
 Case False 
 MsgBox "For Check1, TripleState = " & strTripleState & _ 
 ". The control will cycle through states for Yes and No " & _ 
 "values. Null values display as if they were No values." 
 Case Else 
 MsgBox "Can't determine the TripleState property for Check1." 
End Select 

支援和意見反應

有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應