I receive the foolwoing error in my report :
"You entered an expression that has no value"
In my report i am summing up the all orders with the control
=Sum([liters])
This control is called Bonus. I have then another control called
GrandTotal that calculates the bonus like that:
Private Sub GroupHeader0_Format(Cancel As Integer, FormatCount As Integer)
Me![bonus] = Me![Sum] * rate
Me![TotalBonus] = Me![GrandTotal] * 5/100
End Sub
The report opens ok in case the bonus is not null.Otherwise i receive
the above message. I have tried the following code but with no suucess:
Private Sub Report_Open(Cancel As Integer)
If IsNull(Me![bonus]) Then
MsgBox " There are no orders ", vbExclamation
Me![bonus].Value = 0
Exit Sub
End If
End Sub
I cannot see why the IsNull command is not working.