This was working, and I recently upgraded to 2007 and now I can't figure out how to fix it. Arrrr! 
I have a set of stacked images on my report (Detail section) with property Visible set to No. For this example lets call them "imgState_green", "imgState_red", "imgState_blue".
I have a bounded field (text box) on my report (Detail section) which could have values of "1", "2", or "3" (numeric). Lets call it "idChangeTypes".
When I open my report, for each (Detail section) record with the field "idChangeTypes" = "1" I want the Visible property for "imgState_green" set to Yes so that that image would be visible. When "2" then "imgState_red", and when "3" image "imgState_blue" would be visible. Get the idea?
In my previous working version I had this code tied to the reports "Open" event, for 2007, now I'm no longer certain which event I should use.
[FONT="]I am certain this will turn out to be something very simple, but until then I could use some help. So I have created a simple db with one table and one report to try and get this to work. (I have it available for anyone interested in looking/helping: http://www.mdwyer.net/access/TEST_FormsImageVisible.accdb
I have the following [Event Procedure] associated with the "On Format" of the "Detail" section of my report.
[/FONT]
I have a set of stacked images on my report (Detail section) with property Visible set to No. For this example lets call them "imgState_green", "imgState_red", "imgState_blue".
I have a bounded field (text box) on my report (Detail section) which could have values of "1", "2", or "3" (numeric). Lets call it "idChangeTypes".
When I open my report, for each (Detail section) record with the field "idChangeTypes" = "1" I want the Visible property for "imgState_green" set to Yes so that that image would be visible. When "2" then "imgState_red", and when "3" image "imgState_blue" would be visible. Get the idea?
In my previous working version I had this code tied to the reports "Open" event, for 2007, now I'm no longer certain which event I should use.
[FONT="]I am certain this will turn out to be something very simple, but until then I could use some help. So I have created a simple db with one table and one report to try and get this to work. (I have it available for anyone interested in looking/helping: http://www.mdwyer.net/access/TEST_FormsImageVisible.accdb
I have the following [Event Procedure] associated with the "On Format" of the "Detail" section of my report.
Code:
[/FONT] [FONT="]Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Me.imgState_green.Visible = (idChangeTypes.Value = 1)
Me.imgState_red.Visible = (idChangeTypes.Value = 2)
Me.imgState_blue.Visible = (idChangeTypes.Value = 3)
End Sub[/FONT]
[FONT="]