Solved

Programmatically define new color sceme and apply it to access 2007 db

Posted on 2008-10-15
4
581 Views
Last Modified: 2013-11-27
I have been religiously programming my new access 2007 database using theme colors.  Not the windows theme but the access 2007.  Text Light, Background Dark Header .. etc   is there a way i can make a module to define a new theme and apply it.  I would likely store that data in a small table that will dynamically set the colors based off of which user is logged in.

brandon
0
Comment
Question by:brandonjel
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 84
ID: 22727345
How are you defining the colors? If you're using system color constants then no, you cannot change those. If you're declaring your own constants then you could ...
0
 

Author Comment

by:brandonjel
ID: 22727977
I used the Office Theme Colors which i understood to be different from the windows theme ones.  So Text Light, Text Dark,  Background Dark Header,  etc   Sadly it looks like msaccess only has like 3 themes.. blue grey and black.   Just wish there were more available.  You said you could declare you own.?  How would i define that on the form color side? Can i declare a public variable like.. JP_Text_Light and just put =[JP_Text_Light] as the forecolor?

brandon
0
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 250 total points
ID: 22729529
Colors can be represented as numeric values ... for example, this is a very light Blue color:

16772319

If I want to use that, I'd declare it as a constant:

Public Const JP_Light_Blue = 16772319

And then I'd use it anywhere I need to do so ... you'll have to set your colors in code (for example, in your form's Open or Load event):

Me.txbFirstName.ForeColor = JP_Light_Blue
Me.txbLastName.ForeColor = JP_Light_Blue
etc etc

You'd declare those constants in a Standard Module, in the [General Declarations] section (top of the page).

However, I caution you in doing this ... there's a reason Office products use standard Themes, and while you may think the colors look "cool and modern", if you have to deploy this to several people you might find yourself with some disgruntled users. Many users set their machines to a particular theme because they like it, or because it helps them to see better, or because they have an older machine and cannot make use of the full range of colors on a modern machine. In general your app should conform to the USERS standards - you shouldn't make your user conform to your Apps standards.
0
 

Author Comment

by:brandonjel
ID: 22733739
yes very wise... i was just hoping to make it easier for the user to actually apply a different ms access theme.   Not necessarily create all my own.  I was hoping to create more options in the Access Options, Popular, Select Theme area.  then put that pull down in a custom ribbon.

brandon
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question