Solved

Conditional Formatting for Form in Access

Posted on 2013-11-20
4
468 Views
Last Modified: 2013-11-20
I have a form named frm_showlist that is in datasheet view. I need to do some VBA conditional formatting that basically goes like this

if Status_id = 1 format all the fields in the record in red
if Status_id = 2 format all the fields in the record in blue
if Status_id = 3 format all the fields in the record in brown
if Status_id = 4 no formatting
if Status_id = 5 format all the fields in the record in purple

I can do the conditional formatting in access but it only applies to the cell in question, I cant do it across the board for all the fields in the record

thanks in advance,
Vinnie
0
Comment
Question by:damixa
  • 2
4 Comments
 
LVL 119

Accepted Solution

by:
Rey Obrero earned 250 total points
ID: 39663841
did you select all the cells when you create the conditional formatting?
0
 
LVL 30

Assisted Solution

by:hnasr
hnasr earned 250 total points
ID: 39663866
As capricorn1 suggested.
Select all controls in record, select new rule, apply expression: [Status_id] = 1, select format
For no format set it to automatic.
0
 

Author Closing Comment

by:damixa
ID: 39663885
Great, thanks. Much appreciated
0
 
LVL 30

Expert Comment

by:hnasr
ID: 39663897
Welcome!
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Over the years I have built up my own little library of code snippets that I refer to when programming or writing a script.  Many of these have come from the web or adaptations from snippets I find on the Web.  Periodically I add to them when I come…
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

910 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

21 Experts available now in Live!

Get 1:1 Help Now