I have a form for entering Transactions into an account ledger.
so when I select Transaction Type "Debit" from the Combobox I would like the value entered in the Amount field to automatically be a negative value
Thank you
I have a form for entering Transactions into an account ledger.
so when I select Transaction Type "Debit" from the Combobox I would like the value entered in the Amount field to automatically be a negative value
Thank you
Try:
If combox = "Debit" Then
AmountField = -1 * AmountField
End If
If this helped, please click the star at the bottom left of this posting and add to my reputation. Many thanks.
Bob Fitzpatrick
or just
If combox = "Debit" Then
AmountField = -AmountField
End If
or just leave it as a positive and apply the negative as and when required
Have combo's (e.g. cbbTransactionType) RowSource = '1;"debet";-1;"credit"', LinkedColumn = 1, ColumnCount =2, ColumnWidths = "0,2.5" and BoundColumn = 1. Then
Code:... Me.txtAmountField = ABS(Me.txtAmountField)*Me.cbbTransactionType ...