G
Guest
Hello out there, has any on had this problem brfore?
I have a form which is bound to a transaction table containg currency
numbers, reson codes (RC), dates, an ID and a record number (auto number). A
number may be + (Credit) or - (Debits). A Reason code table (RC_Table) keeps
tract of reasons for transactions and weather they are C or D type and a
description. The form requests the persons ID (a combo box allows selection
of the Id (which is the key by which all data is retrieved from the
transaction table). The next field is recaon code (RC is the control source)
a combo box based on the Reason Code table RC_table. Using the combo box the
user selects the reason (and at the same time RC_table.Type (C or D) is
dispplayed).
SELECT RC_table.RC, RC_table.Reason, RC_table.Type FROM RC_table ORDER BY
[RC];
The next field is amount. And that's where the problem starts. I can't
capture that selected "Type" to perfrom the proper validation on the amout
field which should be + or - depending on the "Type".
If Rc_Type = "C" and Amount < 0 then
MsgBox "this is a ......."
Else If RC_Type = "D" and Amount > 0 then
MsgBox "this is a ......."
End if
A 0 is ok since it may be an opening balance and has no effect of the
account in question.
Please help me find a way to retrieve the Field RC_Type for the list box and
pass it to the Amout field so i can perfrom the test "before update"
Thank you in advance.
Dick
I have a form which is bound to a transaction table containg currency
numbers, reson codes (RC), dates, an ID and a record number (auto number). A
number may be + (Credit) or - (Debits). A Reason code table (RC_Table) keeps
tract of reasons for transactions and weather they are C or D type and a
description. The form requests the persons ID (a combo box allows selection
of the Id (which is the key by which all data is retrieved from the
transaction table). The next field is recaon code (RC is the control source)
a combo box based on the Reason Code table RC_table. Using the combo box the
user selects the reason (and at the same time RC_table.Type (C or D) is
dispplayed).
SELECT RC_table.RC, RC_table.Reason, RC_table.Type FROM RC_table ORDER BY
[RC];
The next field is amount. And that's where the problem starts. I can't
capture that selected "Type" to perfrom the proper validation on the amout
field which should be + or - depending on the "Type".
If Rc_Type = "C" and Amount < 0 then
MsgBox "this is a ......."
Else If RC_Type = "D" and Amount > 0 then
MsgBox "this is a ......."
End if
A 0 is ok since it may be an opening balance and has no effect of the
account in question.
Please help me find a way to retrieve the Field RC_Type for the list box and
pass it to the Amout field so i can perfrom the test "before update"
Thank you in advance.
Dick