Fun Conditional Formatting Access Question

User avatar
mishmish3000
PlatinumLounger
Posts: 3691
Joined: 15 Jul 2010, 14:10
Location: Milton, TN

Fun Conditional Formatting Access Question

Post by mishmish3000 »

:grin:
Greetings!!! Well, first of all, let me tell ya... you don't want to drive into a tornado. We managed to drive into one about three weeks ago and I'm just very glad it was a tiny one (EF0). The CR-V went all over the road, debris hit us, we heard the roar associated with tornadoes... no fun at all. But all turned out ok.
Anyway, I have a fun Access report formatting question. I typed up notes and included screen shots... I'll attach it as a PDF so you can see what I'm thinking about. It's a pretty entertaining question, I hope and one that's sort of fun to figure out. Let me know what you guys think!
MishMish3000
You do not have the required permissions to view the files attached to this post.
Anne

User avatar
HansV
Administrator
Posts: 78626
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Fun Conditional Formatting Access Question

Post by HansV »

Wow, driving into a tornado - not for me... I have a friend, though, who'd love to! :crazy:

You could create an On Format event procedure for the Detail section of the report. Let's say the image controls are named Happy and (surprisingly) Unhappy.

Make the code look like this:

Code: Select all

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    Me.Happy.Visible = (Me.HBsAGPOSBirthsRept2009 > Me.TTLEXP_HIGH)
    Me.Unhappy.Visible = (Me.HBsAGPOSBirthsRept2009 < Me.TTLEXP_LOW)
End Sub
Best wishes,
Hans

User avatar
mishmish3000
PlatinumLounger
Posts: 3691
Joined: 15 Jul 2010, 14:10
Location: Milton, TN

Re: Fun Conditional Formatting Access Question

Post by mishmish3000 »

:grin: I'll try out the code today! Thanks, Hans!
Yes, we knew there was a severe thunderstorm warning out for our area, and as we were driving towards town, we saw really black clouds to the left of us. So we turned and drove toward some whitish-colored clouds, thinking we were driving away from the storm. WRONG! Once we drove into the white colored clouds, we drove directly into the small tornado. It was absolutely terrifying! We thought about stopping the car and seeking shelter in some random home, but with the debris and very strong winds (90 mph), we were more afraid of the debris! So we kept driving, slowly, as the car bounced all over the road. Then--bingo--we were out of it! When I got to work, coworkers were telling me there had been a tornado reported near my house. When we checked the timing, it was exactly where we were! We had trees come down on either side of our house, on the deck, but amazingly no broken windows! We had a bunch of friends over last weekend for a chainsaw, burger and beer party and got it all cleared up. Now we have firewood for next year!!!
:thankyou: for the code... MishMish3000
Anne

User avatar
mishmish3000
PlatinumLounger
Posts: 3691
Joined: 15 Jul 2010, 14:10
Location: Milton, TN

Re: Fun Conditional Formatting Access Question

Post by mishmish3000 »

:fanfare: :fanfare:
Thanks, Hans!!!!! It worked GREAT! The perinatal nurse coordinator was very pleased. This will really help, since we know some of the nurses and other staff have some color blindness issues, so just using color as a conditional format wouldn't help them. But using the graphics works super!
Thank you, thank you, thank you!
MishMish3000

Hope everyone has a super weekend. Here in the US, we have a 3 day weekend coming up because Monday is Memorial Day (remembering fallen veterans).
Anne