Transparent Property

Microsoft Access Visual Basic

Transparent Property

       

You can use the Transparent property to specify whether a command button is solid or transparent. Read/write Boolean.

expression.Transparent

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

Remarks

Tip  Use the BackStyle property to make other controls solid or transparent.

The Transparent property uses the following settings.

Setting Visual Basic Description
Yes True  The button is transparent.
No False  (Default) The button is solid.
You can set this property by using the command button's property sheet, a macro, or Visual Basic.

You can use this property to place a transparent command button over another control. For example, you could place several transparent buttons over a picture displayed in an image control and run various macros or Visual Basic event procedures depending on which part of the picture the user clicks.

Note   To hide and disable a button, use the Visible property. To disable a button without hiding it, use the Enabled property. To hide a button only when a form or report is printed, use the DisplayWhen property.

Example

The following example makes the command button "Preview" on the "Purchase Orders" form transparent.

Forms.Item("Purchase Orders").Controls.Item("Preview"). _
    Transparent = True