Hi, I have a report with a list of parcels and their weights, I am trying to get the report to calculate the postage cost based on the weight. I am using VBA to do it, but I just can't get it to work, this is the code I have.
me.weight is a bound field and me.postage is an unbound text box
Can anyone help?
Thanks
me.weight is a bound field and me.postage is an unbound text box
Code:
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
If Me.Weight < 0.1 Then Me.postage = 0.56
If Me.Weight > 0.1 And Me.Weight < 0.25 Then Me.postage = 1.22
If Me.Weight > 0.25 And Me.Weight < 0.5 Then Me.postage = 1.58
If Me.Weight > 0.75 And Me.Weight < 2 Then Me.postage = 2.82
If Me.Weight > 2 And Me.Weight < 5 Then Me.postage = 7.19
If Me.Weight > 5 And Me.Weight < 10 Then Me.postage = 7.56
End Sub
Can anyone help?
Thanks