Changing the Value of a property

To change the value of a property, follow the property name with an equal sign and a valid value for the property. For example, the Visible property of a control can be True (Yes) or False (No). For example, the following statement makes invisible a control named myButton by setting its Visible property to False (No):

Forms!myForm!myButton.Visible = False

Figure 5-6:

Forms! myForm! myButton. Visible from an Access viewpoint.

myButton myForm

Properties of myButton myButton myForm

Properties of myButton

To make that same control visible again from VBA, set its Visible property back to True (Yes), as shown here:

FormslmyFormlmyButton.Visible = True

0 0

Post a comment