Calculation problem

  • Thread starter Thread starter stockwell43
  • Start date Start date
S

stockwell43

Hello,

I have this code in the After update even of the payment CBO but it doesn't
work. What I want is if the purchase cbo is Wear Jeans throughout (which is
$25) then I want the quantity times the $25 to show the total in an unbound
textbox named total. What I am I doing wrong?

Thanks!!

Private Sub Payment_AfterUpdate()
If Me.Purchase = "Wear Jeans Throughtout" Then
Total = "Me.Quantity" * "25"
End If
End Sub
 
stockwell43,

Let's remove those quotation marks which is turning your fields into text ao
it can't perform the calcualtion. Question?? Is there a chance Quantity
will ever be NULL? You might want to handle that with something like
Nz([Quantity],0) so the line always has a numeric value.


Private Sub Payment_AfterUpdate()
If Me.Purchase = "Wear Jeans Throughtout" Then
Total = Me.Quantity * 25
End If
End Sub


--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm
 
Back
Top