Hi everyone.
I am working on a report that has a running sum text box throughout the detail section of the report. In the report footer I have a summary in which I have a text box i.e. txtTotal, which has the final total of the running sum box in it. I am setting the txtTotal box to store the Nz value of the running sum, so if it is null, then txtTotal is 0, therefore it will always have a numeric value.
In VBA on the report format section, I have an IF...Then statement in VBA saying:
If Me.txtTotal>0 and Me.txtTotal < Then
Me.txtexample=" example"
End If
However, when I run the report, I keep getting an error saying 'Run time error 13 - Type mismatch' and it flags up the line:
If Me.txtTotal>0 and Me.txtTotal < Then
But when I hover my cursor over the txtTotal field it says 'txtTotal=0', so my question is why does it enter into this if statement for only when txtTotal is greater than zero, when it is even saying it is equal to zero when I put my cursor on it?
Thanks.
Gareth.
I am working on a report that has a running sum text box throughout the detail section of the report. In the report footer I have a summary in which I have a text box i.e. txtTotal, which has the final total of the running sum box in it. I am setting the txtTotal box to store the Nz value of the running sum, so if it is null, then txtTotal is 0, therefore it will always have a numeric value.
In VBA on the report format section, I have an IF...Then statement in VBA saying:
If Me.txtTotal>0 and Me.txtTotal < Then
Me.txtexample=" example"
End If
However, when I run the report, I keep getting an error saying 'Run time error 13 - Type mismatch' and it flags up the line:
If Me.txtTotal>0 and Me.txtTotal < Then
But when I hover my cursor over the txtTotal field it says 'txtTotal=0', so my question is why does it enter into this if statement for only when txtTotal is greater than zero, when it is even saying it is equal to zero when I put my cursor on it?
Thanks.
Gareth.
Comment