Solved

Continuous form, different color background depending on record status

Posted on 2014-03-09
3
807 Views
Last Modified: 2014-03-09
I am showing the a continuous form containing both active and inactive records.  This is based on the contents of field 'Active_YN'.

I wanted to put a yellow background on inactive records and white on active records so I tried this in the Current event:

If active_yn=-1 then
        me.detail.background = vbyellow
else
       me.detail.nackground= vbwhite
endif

This doesn't work as I had hoped.  When an active record is current the entire background of the form is white, when an inactive record is current, the entire background of the form is yellow.

I want the user to look at a continuous screen with multiple records showing.  The inactive ones would have a yellow background and the active ones would have a white background.

Is this possible ?
0
Comment
Question by:mlcktmguy
  • 2
3 Comments
 
LVL 57

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 250 total points
Comment Utility
<<Is this possible ? >>

 Yup.  What you need to use is condition formatting.  

A continuous form is an odd duck; most of it is not really there<g>, but rather "painted" on the screen.

 As a result, one of things that's tough is formatting.   But with conditional formatting it's easy.

  Just specify the rule, then the condition you want (background a specific color).

Jim.
0
 
LVL 57

Expert Comment

by:Jim Dettman (Microsoft MVP/ EE MVE)
Comment Utility
0
 
LVL 1

Author Closing Comment

by:mlcktmguy
Comment Utility
Thanks
0

Featured Post

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

762 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

11 Experts available now in Live!

Get 1:1 Help Now