Wzcolpal.mda contains an alternate palette for Access 2.0 that lets you choose from 99 colors for BackColor, BorderColor or the Forms's main section color and have them show up on the form as you make changes. It would be simple to add the ForeColor to the selection list, but sense it would default to one of Access's original 16 I did not do it.

Only one control is changed at a time.  To change more find a color you like and copy it's value to the clipboard form the contol's Property Sheet. Then select all of the controls you want to change and paste the value in the Multiple Selection Property Sheet.


To use this alternate palette you can import the necessary forms and code to your database or load it as a library.

USING IN YOUR DATABASE

Import Forms: frmPaletteNew1, frmScratch.
       Macro: mcrOpenPaletteNew1
       Module:PaletteNew1

To open the palette a command button can be added to the Form design toolbar	or to Access's own Palette which is a toolbar.  To add it to the design toolbar it is necessary to eliminate a button to make room.  I deleted the CueCard button.  This is done by choosing Toolbars in the View menu then finding Form Design in the list and clicking on it and then clicking on customize. Now you can remove the CueCard button by dragging it to a blank area of your desktop.  To create a new button find "All Macros" in the list and click on it. Drag mcrOpenPaletteNew1 to the toolbar and a button is created. 

Please Note: this button will appear on the Form Design toolbar in all databases but will not function unless the macro is imported to that database. 

Note: frmScratch holds the value of the Form and Control from which the palette is called.  It should be out of view on the right side of the screen.  If it shows up drag it to the right so it does not show.

See USING THIS PALETTE.


INSTALLING AS A LIBRARY

First import macro mcrPaletteNew1 to your database and create a button as described above.  Then place wzcolpal.mda in your Access 2 directory.  

Additions are necessary to the MSACC20.INI which is located in your windows directory.  Make a backup of this file first in case you make a mistake.  Open the file in NotePad or other "text only" editor.

Under the section [Menu Add-Ins] add: &New Palette==relActivatePalette().

Under the section [Libraries] add: wzcolpal.mda=rw.

Save the file and restart Access for the changes to take effect.  

Under the File-Addins Menu there will be a listing for New Palette.  You can open it by choosing it here or by clicking on the button you created on the Form design toolbar.  Please see next section before using.

USING THIS PALETTE

There are limitations!  You can change the BackColor or BorderColor of any label or text box by first clicking on it and then invoking the palette.  Do not open the palette with out having a form opened and a control selected! To change the form's Backcolor you must also first select a control and then invoke the palette. 

After palette is opened choose what you want to change, BackColor is the default.  Then click a color button.  Wait a few seconds for the first change to appear, then other changes are faster.  You can switch to BorderColor or SectionColor for this same control with no problem.  To change another control you must first click on it to make it active and then click on the command button on the toolbar the reset the name of the form and control.

That's how to use it.  I am just learning to write code and this code uses Screen.ActiveControl to record info in frmScratch.  When I can figure out how to store this in an array and how to reinitialize it when another control is selected without clicking the button I will do that.
I know the code is crude and will accept any suggestions for improvement! Please tell me if you find this useful and suggest improvements to the design.  Should all of the controls from the Access palette be added to this one?

I spent many days making the buttons and trying to figure out the code and when it was finally working correctly I went to bed.  Next morning Access would not open the form and I had to recreate it and the code. Just a warning, always backup.

Thanks to those who have offered help.  This all a learning process for me. Special thanks to Mike Gunderloy, Roger Harui and Jim Hance for ideas and help!  

Richard Laughinghouse    May 27, 1994


