Conditional Formatting on Form

marnieg

Registered User.
Local time
Today, 12:02
Joined
Jul 21, 2009
Messages
70
I have a form that lets say has the following fields on it.

date, location, precinct, type, low, high

and lets say my data as filtered and sorted using a query on the screen looks like this
5/7/2010 A 100 D 1 50
5/7/2010 A 100 D 51 100
5/7/2010 A 100 D 101 150
5/7/2010 A 100 D 151 200
5/7/2010 A 100 N 1 50
5/7/2010 A 100 N 51 100
5/7/2010 A 200 D 1 50
5/7/2010 A 200 D 51 100
5/7/2010 A 200 N 1 50
5/7/2010 A 200 N 51 100

Now what I want the user to see on the screen is the first row bold or a different color for each precinct meaning it would look like this. There are other fields on the screen to the right of this data that are modifiable but is not important to this question.


5/7/2010 A 100 D 1 50
5/7/2010 A 100 D 51 100
5/7/2010 A 100 D 101 150
5/7/2010 A 100 D 151 200
5/7/2010 A 100 N 1 50
5/7/2010 A 100 N 51 100
5/7/2010 A 200 D 1 50
5/7/2010 A 200 D 51 100
5/7/2010 A 200 N 1 50
5/7/2010 A 200 N 51 100

Is it possible to do this with the conditional formatting or another technique. I know with a report I could using grouping, but don't see how to do this on a form. :confused:

Any suggestions would be helpful
Marnie
 
The solution would be a combination of a continuous form with conditional formatting, a table, a group-by query and a bound query with an outer join.
Since a picture or in this case a sample database says more than a thousand words, here's my sample database.
It detects if another precinct is shown and responds with a different color.

Enjoy!
 

Attachments

Thank you for your solution. I had not thought of using a query to determine the first occurrence. I figured out another way of doing it by adding a field to my table when these records are generated and then used the same type of conditional formatting on the form. Sometimes I just have to step away from a problem and a solution will pop up in my mind.

This forum is awesome. I have always received solutions to my questions in a reasonable amount of time. I hope to return the favor to some other postings.
 

Users who are viewing this thread

Back
Top Bottom