this seemed to be working fine...but i came across this:

dim itemtotal, headertotal as double

headertotal = 90.11
itemtotal = 65.04
txtitemcost.text = 25.07

it goes to the msgbox, I thought it may of been a rounding issue but I inserted another purchase using the same decimals
headertotal = 50.11
itemtotal = 25.04
txtitemcost.text = 25.07...that worked fine..am I missing something here?



VB Code:
  1. If (itemTotal + CDbl(txtItemCost.Text)) > headerTotal Then
  2.      amountneeded = (headerTotal - itemTotal)
  3.      MsgBox("Item total is greater than Receipt amount" & vbCrLf & vbCrLf & "Receipt Total: $" & headerTotal & vbCrLf & "Item Total: $" & itemTotal & vbCrLf & vbCrLf & "Amounted needed to balance: $" & amountneeded, MsgBoxStyle.Information, "PCMS ")
  4.                 Exit Sub
  5.             End If