The management want special general ledger accounts to be attached to the sales invoice automatically so that no manual selection of GL accounts can be allowed to account for the following:
(4) Excise Duty
Now on the main form I have created un bound controls to summaries the content of ( Sales , VAT, Discounts & Excise Duty) as you can see above , and below are the controls created on the main form to do the required summaries:
The mentioned controls above does a good job as you can see from the picture below.
Now I want help to assign both general ledger codes and the value content in the controls above , I have tried the code below it does not work , any help here will be highly appreciated
Private Sub Form_BeforeInsert(Cancel As Integer)
<> "") Then
Me.AccountID = 120 - 15 - 6660 And (Me.Credit = Me.Parent!txtInvoiceSales)
Discounts <> "") Then
Me.AccountID = 110 - 16 - 1004 And (Me.Debit = Me.Parent!txtsalesinvoiceD
How do I do it?