01 November 2011

Modifying the Journal Entry Form



In the previous posting, you have known already, how to create journal entry form using Form Wizard. But the result is a rough form of Journal Entry. We should reformat and add additional function in it. Now open form frmOpenTransactionJournalParent in design view, as depicted below:
Right click mouse to display the shortcut menu. Choose Layout and then Remove button to enable individually field/object formatting.

Click the Properties Sheet icon on the Tools Group of Design Tab to display the Property sheet. Following are the related properties to modify:
  1. Form properties:
    1. Caption = Open Transaction Journal Entry
    2. Auto Center = Yes
    3. Auto Resize = Yes
    4. Fit to Screen = Yes
    5. Record Selector = No
    6. Navigation Button= No
  2. Controls Properties:
    1. JournalId (text box):
      1. Enabled = No
      2. Width = 1"
    2. TransactionDate (text box), JournaType (combo box), JournalNumber (text box), Ref (text box), RefNo (text box), CreatedBy (text box), ApprovedBy (text box):
      1. Width = 1"
    3. frmOpenTransactionJournalChild (subform):
      1. Width = 9"
Under the subform frmOpenTransactionJournalChild, insert the text box controls by clicking Design tab and Text Box icon in Controls group as follows:
  1. Text Box TotalDebit, properties:
    1. Name = TotalDebit
    2. Control Source = =NZ([frmOpenTransactionJournalChild].[Form]![TotalDebit],0)
    3. Format = Standard
    4. Width = 1
    5. The related label properties for this text box:
      1. Name = TotalDebit_lbl
      2. Caption = TotalDebit:
      3. Adjust the width as neccessary
  2. Text Box TotalCredit:
    1. Name = TotalCredit
    2. Control Source = =NZ([frmOpenTransactionJournalChild].[Form]![TotalCredit],0)
    3. Format = Standard
    4. Width = 1
    5. The related label properties for this text box:
      1. Name = TotalCredit_lbl
      2. Caption = TotalCredit:
      3. Adjust the width as neccessary
Inside subform frmOpenTransactionJournalChild do the following steps:
  1. On the Form Footer, insert the text box controls by clicking Design tab and Text Box icon in Controls group as follows:
    1. Text Box TotalDebit, properties:
      1. Name = TotalDebit
      2. Control Source = =Sum([Debit])
      3. Width = 1
      4. The related label properties for this text box:
        1. Name = TotalDebit_lbl
        2. Caption = TotalDebit:
        3. Adjust the width as neccessary
    2. Text Box TotalCredit:
      1. Name = TotalCredit
      2. Control Source = =Sum([Credit])
      3. Width = 1
      4. The related label properties for this text box:
        1. Name = TotalCredit_lbl
        2. Caption = TotalCredit:
        3. Adjust the width as neccessary
  2. In the Debit text box properties, insert event procedure
    1. After Update = [Event Procedure], VB Script as follows:
       Private Sub Debit_AfterUpdate()
        Forms![frmOpenTransactionJournalParent]![TotalDebit].Requery
       End Sub
  3. In the Credit text box properties, insert event procedure
    1. After Update = [Event Procedure], VB Script as follows:
      Private Sub Credit_AfterUpdate()
        Forms![frmOpenTransactionJournalParent]![TotalCredit].Requery
      End Sub
  4. In the AccountCode combo box properties set the Row Source = tblMainAccount
  5. In the Deriv1 combo box properties, set  the Row Source = tblDerivativeAccount1
  6. In the Deriv2 combo box properties, set  the Row Source = tblDerivativeAccount2
At this moment, we have finished re-formatting the form. The display will look like this:

2 comments :

  1. This is Very informative but where are the next procedures/tutorials in this developing accounting system blog?

    ReplyDelete
  2. This is Very informative but where are the next procedures/tutorials in this developing accounting system blog?

    ReplyDelete