Solved

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

Posted on 2008-10-15
4
541 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
  • 2
  • 2
4 Comments
 
LVL 84
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

772 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now