Hello,
I'm a safety professional and I have to write my own software. I end up doing a lot of trial and error but I'm stuck on this one.
I have a report based on a query in Access 2002. It reports on the result of an inspection of 15 different areas of a school. The report contains 15 combo boxes in the detail section. The values of each of those boxes can be "OK", "D", "X", or "NA". I want the report to show the the D,X, or NA values but if the value is OK, I want the report to show a checkmark.
I'm thinking I need to place a for each/next loop in the OnFormat event of the detail area to evaluate the value of each control. If it equals "OK", I need to change the font to wingdings and print Char<0252>.
Here's some code that doesn't work:
Dim ctl As Control
Set ctl = [1 gas leaks]
For Each ctl In Controls
If ctl = "OK" Then
ctl.FontName = "wingdings"
ctl.Text = "ü"
End If
Next ctl
End Sub
Is this the right tack to take on this problem? Can anyone suggest code for this to get me started?
I'm a safety professional and I have to write my own software. I end up doing a lot of trial and error but I'm stuck on this one.
I have a report based on a query in Access 2002. It reports on the result of an inspection of 15 different areas of a school. The report contains 15 combo boxes in the detail section. The values of each of those boxes can be "OK", "D", "X", or "NA". I want the report to show the the D,X, or NA values but if the value is OK, I want the report to show a checkmark.
I'm thinking I need to place a for each/next loop in the OnFormat event of the detail area to evaluate the value of each control. If it equals "OK", I need to change the font to wingdings and print Char<0252>.
Here's some code that doesn't work:
Dim ctl As Control
Set ctl = [1 gas leaks]
For Each ctl In Controls
If ctl = "OK" Then
ctl.FontName = "wingdings"
ctl.Text = "ü"
End If
Next ctl
End Sub
Is this the right tack to take on this problem? Can anyone suggest code for this to get me started?