J
jhalstead85
First time poster so please bare with me. I'm working on an Access
2003 database with a continuous form and I need some help with some
conditional formatting. Basically when the form loads I want to
compare a field from each record with the same field on the previous
record. If the Abs() difference of the two field is greater than or
equal to 1 I would like to make that control/field in the current
record yellow. I've searched high and low on Google for a solution and
spent the last 3 days trying to work on the kinks but cannot wrap my
head around this problem and how to go about it.
To clarify what I need see the following:
Assume we have a simple continuous form with three fields per row.
----Date----|-----Time-----|-randNum
--------------------------------------------
07-Jan-09 | 2:00 P.M. | -75.2
--------------------------------------------
07-Jan-09 | 3:00 P.M. | -75.5
--------------------------------------------
07-Jan-09 | 4:00 P.M. | -78.5
--------------------------------------------
07-Jan-09 | 5:00 P.M. | -74.5
--------------------------------------------
What I need:
Compare 3PM [randNum] to 2PM [randNum]. If absolute difference is >= 1
then turn 3PM randNum to yellow.
Compare 4PM [randNum] to 3PM [randNum]. If absolute difference is >= 1
then turn 4PM randNum to yellow.
....and so on and so forth for all records
The above needs to happen when the form is loaded/refreshed/requeried
and if/when a new record is added.
I'm up for any solution (robust, simple, tedious, etc).
Please let me know if you need any further explanation and thanks,
J
2003 database with a continuous form and I need some help with some
conditional formatting. Basically when the form loads I want to
compare a field from each record with the same field on the previous
record. If the Abs() difference of the two field is greater than or
equal to 1 I would like to make that control/field in the current
record yellow. I've searched high and low on Google for a solution and
spent the last 3 days trying to work on the kinks but cannot wrap my
head around this problem and how to go about it.
To clarify what I need see the following:
Assume we have a simple continuous form with three fields per row.
----Date----|-----Time-----|-randNum
--------------------------------------------
07-Jan-09 | 2:00 P.M. | -75.2
--------------------------------------------
07-Jan-09 | 3:00 P.M. | -75.5
--------------------------------------------
07-Jan-09 | 4:00 P.M. | -78.5
--------------------------------------------
07-Jan-09 | 5:00 P.M. | -74.5
--------------------------------------------
What I need:
Compare 3PM [randNum] to 2PM [randNum]. If absolute difference is >= 1
then turn 3PM randNum to yellow.
Compare 4PM [randNum] to 3PM [randNum]. If absolute difference is >= 1
then turn 4PM randNum to yellow.
....and so on and so forth for all records
The above needs to happen when the form is loaded/refreshed/requeried
and if/when a new record is added.
I'm up for any solution (robust, simple, tedious, etc).
Please let me know if you need any further explanation and thanks,
J