Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conditional Formatting Question

Status
Not open for further replies.

mercwonder007

IS-IT--Management
Aug 12, 2005
33
US
How can I use VBA to change the color of a cell background based off of the data. (Ex. if I type in 1.01 turn the background of the cell to "blue", if I type in 2.02 or 2.03 turn the background to "red") Any help with this would be greatly appreciated. I know I can use conditional formatting but that limits me to only 3 options. I need to have more options than that. Thank you.
 


Have you searched the forum? There have been a number of posts on this topic.

Skip,

[glasses] [red]A palindrome gone wrong?[/red]
A man, a plan, a ROOT canal...
PULLEMALL![tongue]
 
If you know of a specific string that would be very helpful
 
I am trying to get resolution to a similar problem, but I would like to see the color changing in the PRINT VIEW of an access form or report. For example I have a list of part numbers on a white box background. I need the box to change color if the part number is of class A B C D E F.... many classes. Conditional formatting does the trick for just 3 options. I need it for 20 or so.

Good luck,
Kuzz

"Time spent debating the impossible subtracts from the time during which you
can try to accomplish it."
 
KUZZ - given the number of replies you have made in the Access fora I am very surprised that you are posting like this - tacking on to 3 seperate threads.

I have not RF'd for my own amusement but to try and enforce the wishes of site mgmt about how the site is run

Please do not insult me for asking you to post within the rules of the site

I will let Site mgmt decide what to do with your other 2 posts but if they are still there tomorrow I will be very surprised

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Hi, I'm quite new to visual basic and I was looking for a way to set the format of a field on an MS Access report based on the value of another field on the same report.

ie. if two dates don't match, one of them should be highlighted in bold, red text.

Does anyone know if this is possible?

Thanks
psirac
 
hi psirac
unfortunately i don't know the answer to your problem!!

however i do know that you are unlikely to get a response in this way. you will be much better off starting a thread all of your own. you will also then be posting within the 'rules' of the site, or at the very least, within accepted etiquette.

good luck!

;-)
If a man says something and there are no women there to hear him, is he still wrong? [ponder]
How do I get the best answers?
 
Thanks Loomah :)
Actually I found a way to do it without using VB, it was more simple than I thought but finding the correct syntax took a while.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top