Applies ToAccess for Microsoft 365 Access 2021 Access 2019 Access 2016

Applies to

CheckBox Object

OptionButton Object

ToggleButton Object

You can use the TripleState property to specify how a check box, toggle button, or option button will display Null values. Read/write Boolean.

expression.TripleState

expression Required. An expression that returns one of the objects in the Applies To list.

Remarks

The TripleState property uses the following settings.

Setting

Visual Basic

Description

Yes

True

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.

No

False

(Default) The control will cycle through states for Yes and No values. Null values display as if they were No values.

Note: You can set the TripleState property by using a control's property sheet, a macro, or Visual Basic for Applications (VBA) code.

This property can be set in any view.

Example

The following example displays a message describing in detail the state of a check box named "Check1" on the form "frmOperations".

Dim strTripleState As StringstrTripleState = Forms.Item("frmOperations").Controls.Item("Check1").TripleStateSelect 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 

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.