I have a form where I need to make sure the amount does not exeed it's balance. So I have this if statement but it seems to not work properly.
If Me.txtOEA > Me.txtreserve Then
MsgBox "amount you wish to transfer exeeds the balance"
Me.txtOEA.SetFocus
Exit Sub
End If
txtOEA is the amount user will input and txtreserve has a control of : =Format(Forms!frm_EncLedger!cbobudgetid.column(10),"Currency") 'balance
I've tried the following. I thought problem might be the format or the control property.
I've tried doing...
If Format(Me.txtOEA, "currency") > Me.txtreserve Then
MsgBox "amount you wish to transfer exeeds the balance"
Me.txtOEA.SetFocus
Exit Sub
End If
and I also tried creating a "ghost" text box and set it equal to txtreserve but that didn't work either.
Can anyone help me?
If Me.txtOEA > Me.txtreserve Then
MsgBox "amount you wish to transfer exeeds the balance"
Me.txtOEA.SetFocus
Exit Sub
End If
txtOEA is the amount user will input and txtreserve has a control of : =Format(Forms!frm_EncLedger!cbobudgetid.column(10),"Currency") 'balance
I've tried the following. I thought problem might be the format or the control property.
I've tried doing...
If Format(Me.txtOEA, "currency") > Me.txtreserve Then
MsgBox "amount you wish to transfer exeeds the balance"
Me.txtOEA.SetFocus
Exit Sub
End If
and I also tried creating a "ghost" text box and set it equal to txtreserve but that didn't work either.
Can anyone help me?