Validating transactions on Subform
Hi
I have a sub form linked to the main form with financial data below, now the business rules are as follows:
(1) If the DR (Debits) and CR (Credits) are not equal then the data shall NOT be saved on the table
(2) If the DR and CR are equal then the data shall be held for further processing before finally released by a senior official after satisfaction ,and then finally saved on the table permanently
Now how can write the code to satisfy the above two rules. See below:
SubForm
Details Account Code DR CR
Milk 560100 £5.00
Tea 560101 £2.00
Other 560102 £1.00
Sugar 560103 £2.00
Total £5.00 £5.00
|