?
Solved

Conditional Formatting for Form in Access

Posted on 2013-11-20
4
Medium Priority
?
477 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 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 1000 total points
ID: 39663841
did you select all the cells when you create the conditional formatting?
0
 
LVL 31

Assisted Solution

by:hnasr
hnasr earned 1000 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 31

Expert Comment

by:hnasr
ID: 39663897
Welcome!
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

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.
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

850 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