Report

rnutts

Registered User.
Local time
Today, 13:28
Joined
Jun 26, 2007
Messages
110
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
 
The code needs to go in the on format event of the reports section.

ie the detail section if that is where the text boxes are.
 
Have posted code into the 'On Format' event of the Detail Section of the Report and still getting the same result

Any further thoughts

Richard
 

Users who are viewing this thread

Back
Top Bottom