Hello everyone!
The last line results in false when I type in the immediate window. And it should not! Debug.print shows the balleft IS greater than the baldue. When I hover over baldue I get: "$164.69" WITH the quotes. Balleft is fine 400. What am I missing please? TIA!
Code:
Dim strsql As String
Dim baldue As Currency
Dim balleft As Currency
Dim payment As Currency
Dim CRAmount As Currency
Dim DBAmount As Currency
baldue = Format(Me.baldue,"currency")
balleft = Me.payment
' Add to payments
DoCmd.RunSQL "INSERTINTO AsmtPayments ( PaymentAmount, MemberID, PaymentDate ) " & vbCrLf& _
"SELECT[Forms]![AccountsandPayments]![Accountssubform].[Form]![payment] AS Expr1,Accounts.MemberID,
[Forms]![AccountsandPayments]![Accountssubform].[Form]![datepaid]AS Expr2 " & vbCrLf & _
"FROM Accounts "& vbCrLf & _
"WHERE(((Accounts.MemberID)=[Forms]![AccountsandPayments]![MemberID]));"
DoCmd.SetWarnings True
'Me.Requery
'There is money and assessments to pay
' Find first unpaid item
Forms![AccountsandPayments]![Accountssubform].SetFocus
Forms![AccountsandPayments]![Accountssubform].Form![DateAssessed].SetFocus
DoCmd.GoToRecord , , acFirst
While balleft >=baldue Andbaldue > 0