Dear all,
I am trying to calculate an amount on a text box based on a TotalAmount present on the form and the discount percentage related to the provider selected on the same form with is in the table "ProviderDatabase" in the field "SavingsDetails"
With the help of an user here, I got to the expression:
Private Sub cmbTotalAmountToPayGBP_AfterUpdate()
Me.testsaving = [TotalAmounttoPay(GBP)] * (1 - Nz(DLookup("SavingsDetails", "ProviderDatabase", "ProviderID=" & """" & [ProviderID] & """"), 0))
End Sub
I am getting a debug error: "data type mismatch in criteria espression"
Could somebody please point me out where the error can be?
I am trying to calculate an amount on a text box based on a TotalAmount present on the form and the discount percentage related to the provider selected on the same form with is in the table "ProviderDatabase" in the field "SavingsDetails"
With the help of an user here, I got to the expression:
Private Sub cmbTotalAmountToPayGBP_AfterUpdate()
Me.testsaving = [TotalAmounttoPay(GBP)] * (1 - Nz(DLookup("SavingsDetails", "ProviderDatabase", "ProviderID=" & """" & [ProviderID] & """"), 0))
End Sub
I am getting a debug error: "data type mismatch in criteria espression"
Could somebody please point me out where the error can be?