hi need codes for displaying a negative value eg ($-1000) in the balance txt when a person pays more cash here are my codes
Private Sub CmdCalc_Click()
'to declare variables
Dim Nam As String
Dim Unit As String
Dim Amt As Currency
Dim Bal As Currency
Dim Tot As Currency
Dim pay As Currency
Const Service_rate = "Ksh3500"
Nam = Val(TxtName.Text)
Tot = Val(TxtTotal.Text)
Unit = Val(TxtUnitNo.Text)
Amt = Val(TxtAmount.Text)
Bal = Val(TxtBal.Text)
pay = Val(TxtPay.Text)
Tot = Amt + 0
Bal = Service_rate - Tot
TxtTotal.Text = Format(Tot, "Currency")
TxtBal.Text = Format(Bal, "Currency")
TxtAmount.Text = Format(Amt, "Currency")
TxtPay.Text = Format(pay, "Currency")
TxtPay.Text = Service_rate
If FrmTikmash.OptFull = True Then
TxtStatus = "Paid"
End If
If FrmTikmash.OptBal = True Then
TxtStatus = "Has Balance"
End If
If FrmTikmash.OptNot = True Then
TxtStatus = "Not Paid"
End If
If FrmTikmash.OptIOU = True Then
TxtStatus = "IOU"
End If
End Sub