S
stephendeloach via AccessMonster.com
i have a form that does not multiply correctly. i enter Quantity, UnitPrice,
check Expendable (if needed and this adds 10% to the UnitPrice). then the
UnitPrice and the 10% are added together.. everything is fine. I then
multiple the UnitPrice (which goes to NetAmount) by the Quantity which is
then put in TotalAmount but is off by roughly 2 cents. It only happends when
i check the Expendable box. Here are my formulas....
Private Sub expen_AfterUpdate()
expen = expen / 100
End Sub
Private Sub Expendable_AfterUpdate()
If Me!Expendable = True Then
Me!Netamount = Nz(Me!UnitPrice, 0) * [expen] + [UnitPrice]
Else
Me!NetAmount = Nz(Me!Netamount, 0) - [expen] * [UnitPrice]
End If
End Sub
Private Sub test_AfterUpdate()
NetAmount = UnitPrice
End Sub
Private Sub test_Enter()
NetAmount = UnitPrice
End Sub
something isnt adding up right. i have tried everything and cant get it....
UnitPrice is set to Currency. Quantity is set to Number. Netamount is set to
Currency. Expen is set to Number (its the percent that is multiplied)... i
think thats all the info you should need....? Thanks
check Expendable (if needed and this adds 10% to the UnitPrice). then the
UnitPrice and the 10% are added together.. everything is fine. I then
multiple the UnitPrice (which goes to NetAmount) by the Quantity which is
then put in TotalAmount but is off by roughly 2 cents. It only happends when
i check the Expendable box. Here are my formulas....
Private Sub expen_AfterUpdate()
expen = expen / 100
End Sub
Private Sub Expendable_AfterUpdate()
If Me!Expendable = True Then
Me!Netamount = Nz(Me!UnitPrice, 0) * [expen] + [UnitPrice]
Else
Me!NetAmount = Nz(Me!Netamount, 0) - [expen] * [UnitPrice]
End If
End Sub
Private Sub test_AfterUpdate()
NetAmount = UnitPrice
End Sub
Private Sub test_Enter()
NetAmount = UnitPrice
End Sub
something isnt adding up right. i have tried everything and cant get it....
UnitPrice is set to Currency. Quantity is set to Number. Netamount is set to
Currency. Expen is set to Number (its the percent that is multiplied)... i
think thats all the info you should need....? Thanks