PaintPalette Property

Applies To

Form, Report.

Description

You can use the PaintPalette property to specify a palette that can be used by the PaletteSource property of a form or report.

Setting

You can set the PaintPalette property using a macro or Visual Basic. The property setting must be a String data type.

For a form, you can set the PaintPalette property in Design view and Form view.

For a report, you can set the PaintPalette property in Design view only.

Remarks

When you set the PaintPalette property, Microsoft Access makes a copy of the palette that you specify and saves it with the form or report. The palette is then available if you modify that form or report.

Changes to the palette you specified when you set the PaintPalette property don’t affect the copy of the palette stored with the form or report. If you want to update the copy of the palette stored with the form or report, you must rerun the code or macro that sets the PaintPalette property or reset the PaletteSource property when the form or report is open.

When you set the PaintPalette property for a form or report, Microsoft Access automatically updates its PaletteSource property. Conversely, when you set the PaletteSource property for a form or report, the PaintPalette property is also updated. For example, when you specify a custom palette with the PaintPalette property, the PaletteSource property setting is changed to Custom.

Note Windows can have only one color palette active at a time. Microsoft Access allows you to have multiple graphics on a form, each using a different color palette. The PaletteSource property lets you specify which color palette a form should use when displaying graphics.

See Also

ObjectPalette Property, PaletteSource Property, Picture Property.

Example

See the ObjectPalette property example.