Solved

Conditional Formatting for Form in Access

Posted on 2013-11-20
4
467 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
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.

707 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

17 Experts available now in Live!

Get 1:1 Help Now