Hello everyone
I've got a report, on it open event I used the following code:
Private Sub Report_Open(Cancel As Integer)
Me.RecordSource = "select * from transaction where Name _
= " & """" & Forms!printre.MyFilter _
& """" & " and [Date] > #" & Forms!printre.MyDate & "#"
End Sub
It works fine. my problem is this:
I want to add a label which will be depand on a value from a field in the table.
for example. let's say the value is on the balance field on transaction table.
I want to write something like this:
if rs.balance>0 then
label.caption= " you're above 0 "
else
label.caption= " you're below zero"
my question is: what do I write, and where?
I've got a report, on it open event I used the following code:
Private Sub Report_Open(Cancel As Integer)
Me.RecordSource = "select * from transaction where Name _
= " & """" & Forms!printre.MyFilter _
& """" & " and [Date] > #" & Forms!printre.MyDate & "#"
End Sub
It works fine. my problem is this:
I want to add a label which will be depand on a value from a field in the table.
for example. let's say the value is on the balance field on transaction table.
I want to write something like this:
if rs.balance>0 then
label.caption= " you're above 0 "
else
label.caption= " you're below zero"
my question is: what do I write, and where?