Solved

Continuous form, different color background depending on record status

Posted on 2014-03-09
3
827 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
ID: 39916190
<<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
ID: 39916192
0
 
LVL 1

Author Closing Comment

by:mlcktmguy
ID: 39916219
Thanks
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

809 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