Funny Report
Greetings all, I'm Vince and I am new here. I would like to know if anyone can help me with an interesting problem that I am having with one of my reports.
I created a report based on a query that I wrote. The query and report work just fine. I am however trying to fine tune the report. I have added an Overdue label to the report that is normally not visible. I have added several different controls to the form to calculate the DateDiff between when the item was due for calibration and now. The result is either a positive number or negative number which currently show on the report. What I am trying to do is get the "Over Due" label to appear Only for the records where the number of days remaining is less than one. In VBA I wrote some simple code to do this.
Private Sub Report_Load()
If txt_days_remain.Value < 1 Then
lbl_over_due.Visible = True
Else
lbl_over_due.Visible = False
End If
End Sub
The code runs fine and I get the "Over Due" label to appear, but here is the wierd part. If any one of the records has a negative number in the days remaining txt box, then the "Over Due" lable appears for all of the records even if it is not overdue. I am pretty sure that this has something to do with the isolating a record set, but this is something that I haven't figured out how to do just yet. If anyone can help I would appriciate it.
|