Unfortunately with conditional formatting, there is no way to reference
anything other than the current record (e.g. you can't run a comparison on
this value versus the previous value). Conditional formatting will not work
with functions either, which is very limiting. Also unfortunately,
continuous forms cannot be formatted by record... whatever you change in one
record will change in all records, except a few examples using conditional
formatting.
All in all, you're rather limited. The maximum different colors you will
every get from cond. formatting is four (default, and three expressions it
allows).
If you don't have more than 4 different routes to format, you should be ok,
but if you do, there's only one thing I can think of, and it won't work that
great unless you know what routes are going to be displayed every time.
Consider you have routes 1, 2, 3, 4, 5, 6, 7, 8, 9 and 10
You have 4 conditions (3 + default)
If Number = 1, 5, or 10, leave at default
If Number = 2, or 6, set to color1
If number = 3 or 7, set to color2
if number = 4 or 8 set to color 3
(if you actually go this route you could set them up by mathematical
operators and comparisons to handle a larger number of possiblilities)
So, if you are ordered by number, and the numbers are sequential, and will
remain that way, you could effectively format your form so you will see
something like
grey
grey
grey
blue
blue
white
white
white
red
red
grey
blue
blue
white
red
red
.....
The only problem is, if there is ever numbers missing and the returned
records will be non-sequential, you can never really count on two whites not
whowing up next to each other where they shouldnt. I'm guessing that the
numbers will be nonsequential, but thats the best I can offer.
hth
--
Jack Leach
www.tristatemachine.com
- "Success is the ability to go from one failure to another with no loss of
enthusiasm." - Sir Winston Churchill
"rhardy" wrote:
> I have a list of addresses that have an assigned route number, they are
> displayed in a continous form sorted by route number. There are approx 20
> addresses per route and I would like to change the color of one of the
> controls whenever the route number changes. I am stuck on how to tell when
> the route number changes and then trigger some type of conditional formatting.
> --
> rhardy
>
>
> "John Spencer" wrote:
>
> > You would have to use a subquery to determine the "previous" value and
> > then perhaps you could use that with conditional formatting. Without a
> > lot more details, it is difficult to tell you an exact solution.
> >
> >
> >
> > '====================================================
> > John Spencer
> > Access MVP 2002-2005, 2007-2009
> > The Hilltop Institute
> > University of Maryland Baltimore County
> > '====================================================
> >
> >
> > rhardy wrote:
> > > In Access 2003, how do you detect when a value changes in a given control. I
> > > have a continous form and in one control (text) the value can be the same for
> > > several records then change to a different value. I would like to have the
> > > control highlighted whenever the value changes. Is this possible?
> > >
> > > Thanks for your help.
> >