Sorry for the poor thread title.
I have a report[Lab Sheet] based upon a query [Lab Sheet Query] which selects values from a table. One of these values is from a checkbox, so we have records which may return a value of -1.
I have created an if statement in the 'on activate' event of the report which puts a value into another field on the report based upon the value of the checkbox. If statement below.
Problem is that the code puts the "***" value into the field for every record on the report rather than just against the record with the value -1 in the field [24hour].
Code below
Private Sub Report_Activate()
If Reports![Lab Sheet]![24hour] = -1 Then
Reports![Lab Sheet]![rntest].Value = "***"
End If
End Sub
The idea is that the "***" highlights that this particular item on the report needs urgent action, not the whole selection of records, hence the need for only the reocrd with the value of -1 from the checkbox to carry the "***" value
Please can someone help me with expanding the code or advise a different way around this problem
Thanks
Richard
I have a report[Lab Sheet] based upon a query [Lab Sheet Query] which selects values from a table. One of these values is from a checkbox, so we have records which may return a value of -1.
I have created an if statement in the 'on activate' event of the report which puts a value into another field on the report based upon the value of the checkbox. If statement below.
Problem is that the code puts the "***" value into the field for every record on the report rather than just against the record with the value -1 in the field [24hour].
Code below
Private Sub Report_Activate()
If Reports![Lab Sheet]![24hour] = -1 Then
Reports![Lab Sheet]![rntest].Value = "***"
End If
End Sub
The idea is that the "***" highlights that this particular item on the report needs urgent action, not the whole selection of records, hence the need for only the reocrd with the value of -1 from the checkbox to carry the "***" value
Please can someone help me with expanding the code or advise a different way around this problem
Thanks
Richard