Using Access 2003 VBA, I have a report using some 57 bound and calculated fields.
Client wants any field that is not equal to Zero to print in red.
In the Detail On Print event of the report, I need to loop through the textbox controls of the Detail Section.
How do I refer to this report's Detail Section textboxes?
Current code below changes all txtboxes to red (as far as I could get)
Dim db As DAO.Database
Dim ctl As DAO.Control
Dim fld As DAO.Field
Dim prp As DAO.Property
Set db = CurrentDb()
For Each ctl In Me.Detail.Controls
With ctl
Select Case .ControlType
Case acTextBox
.ForeColor = vbRed
End Select
End With
Client wants any field that is not equal to Zero to print in red.
In the Detail On Print event of the report, I need to loop through the textbox controls of the Detail Section.
How do I refer to this report's Detail Section textboxes?
Current code below changes all txtboxes to red (as far as I could get)
Dim db As DAO.Database
Dim ctl As DAO.Control
Dim fld As DAO.Field
Dim prp As DAO.Property
Set db = CurrentDb()
For Each ctl In Me.Detail.Controls
With ctl
Select Case .ControlType
Case acTextBox
.ForeColor = vbRed
End Select
End With