UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Code To Select Form Custom Color Scheme, Access 2016    
 
   
rmcgaffic
post Mar 18 2017, 02:47 PM
Post#1



Posts: 119
Joined: 18-June 06



How can you programmatically select a specific color theme, either custom or MS Access standards such as Median, Paper, or Marquee?

I have defined three custom color schemes using the path Design>Colors>Custom colors.

My names and respective custom colors for Accent 1 and Accent 2 are as follows:

BlackRed (Black, Red)
BlackYellow (Black, Yellow)
Custom1 (Green,Blue)

I want to change the color of all the forms in my application to use the same color scheme without opening and changing each form.

I already have code to successfully change the color, but it is driven by the Color Scheme selected when the form was FIRST created.

If the form was originally created using scheme BlackRed, then I would like to specify the new color scheme as BlackYelllow,
so that when my code to change color executes, Accent 2 will be changed from Red to Yellow.


How would you use code to select color scheme Custom1(Green,Blue) from my list of three color schemes?

Thanks,
Bob
Go to the top of the page
 
rmcgaffic
post Mar 18 2017, 03:11 PM
Post#2



Posts: 119
Joined: 18-June 06



Here's what doesn't work:

With Forms(o.Name)
.PaintPalette = "Custom1"
.Detail.BackThemeColorIndex = 4
.Detail.BackShade = 50
End With

I've also tried to set the PalletSource property of the form from its standard value (Default), but changing this property generates an error.
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    13th December 2017 - 09:20 PM