mlanciano7
New member
- Local time
- Today, 06:19
- Joined
- Nov 6, 2023
- Messages
- 6
I am working on an access database for digitizing SDS sheets, and I want images to show or not show depending on the content of the record. I used the following section of code repeatedly for each image set where the red image shows if the corresponding text says anything other than no and the grey image shows when the text says no. Each text box has a name and each image has a name.
If Me.TXT_Health = "No" Then
Me.IMG_HEALTH_RED.Visible = False
Me.IMG_HEALTH_BW.Visible = True
Else
Me.IMG_HEALTH_RED.Visible = True
Me.IMG_HEALTH_BW.Visible = False
End If
My issue lies when I run the report, only one of the entries follows the visible or not rules correctly. Below are the three entries on the report and as you can see only one that is correct is the last entry. Is there a way that I can use the visible or not VBA code to have these images match the text boxes per record correctly? If you need any other information let me know.
TIA!!!
If Me.TXT_Health = "No" Then
Me.IMG_HEALTH_RED.Visible = False
Me.IMG_HEALTH_BW.Visible = True
Else
Me.IMG_HEALTH_RED.Visible = True
Me.IMG_HEALTH_BW.Visible = False
End If
My issue lies when I run the report, only one of the entries follows the visible or not rules correctly. Below are the three entries on the report and as you can see only one that is correct is the last entry. Is there a way that I can use the visible or not VBA code to have these images match the text boxes per record correctly? If you need any other information let me know.
TIA!!!