Private Sub Discount_AfterUpdate()
Dim strFilter As String
' Evaluate filter before it's passed to DLookup function.
strFilter = "DiscountID = " & Me!Discount
' Look up product's unit price and assign it to UnitPrice control.
Me!Discount_Pec = DLookup("DiscountAmount", "Discount", strFilter)
Me.Discount_Amount = Me.Subtotal * (Discount_Pec / 100)
End Sub
if i have a subtotal of 8.00
Me!Discount_Pec = 10
me.discount_amount is 1.00 instead of .80
Dim strFilter As String
' Evaluate filter before it's passed to DLookup function.
strFilter = "DiscountID = " & Me!Discount
' Look up product's unit price and assign it to UnitPrice control.
Me!Discount_Pec = DLookup("DiscountAmount", "Discount", strFilter)
Me.Discount_Amount = Me.Subtotal * (Discount_Pec / 100)
End Sub
if i have a subtotal of 8.00
Me!Discount_Pec = 10
me.discount_amount is 1.00 instead of .80