Skip to main content

Creating Master Table for Subaccounts

In our accounting database, we have two subaccounts that are part of the primary accounts. They are some sort of derivative accounts for the primary accounts. The two subaccounts may serve as profit center, cost center, organization unit, vendor, customer, tax, etc. The subaccounts are stored in two tables, one for subaccounts 1 and the other for subaccounts 2. Following are the explanation for both two tables.

Table name: tblSubAccounts1

The tblSubAccounts1 can serve as the table to store data related with vendors, costumers, divisions, or departments. In this case, the tblSubAccounts1 used to store division or department data. Fields in the table are as follows.

  1. Field Name= subAccountCode1
    1. Data Type= Text
    2. Description= Type code for subaccount 1
    3. Field Properties - General Tab:
      1. Field Size= 3
      2. Caption= Subaccount Code
  2. Field Name= subAccountName1
    1. Data Type= Text
    2. Description= Type name for subaccount 1
    3. Field Properties - General Tab:
      1. Field Size= 100
      2. Caption= Subaccount Name
  3. Field Name= subAccountDescription1
    1. Data Type= Text
    2. Description= Type description for subaccount 1
    3. Field Properties - General Tab:
      1. Field Size= 150
      2. Caption= Description
  4. Primary key: subAccountCode1

Table name: tblSubAccounts2

The tblSubAccounts2 can serve as the table to store data related with products, projects, or services. In this case, the tblSubAccounts2 serve as the project data. Following are the required fields.

  1. Field Name= subAccountCode2
    1. Data Type= Text
    2. Description= Type subaccount code 2
    3. Field Properties - General Tab:
      1. Field Size= 3
      2. Caption= Subaccount Code
  2. Field Name= subAccountName2
    1. Data Type= Text
    2. Description= Type name for subaccount 2
    3. Field Properties - General Tab:
      1. Field Size= 100
      2. Caption= Subaccount Name
  3. Field Name= subAccountDescription2
    1. Data Type= Text
    2. Description= Type description for subaccount 2
    3. Field Properties - General Tab:
      1. Field Size= 150
      2. Caption= Description
  4. Primary key: subAccountCode2

Comments

Popular posts from this blog

Functions to Open and Close DAO Database

This post describes how to create functions to open and close MS Access database. The functions involve two common methods provided by MS Access, they are OpenDatabase and Close. Opening a database, especially  used in connecting to tables and queries is the first process in accessing database. Meanwhile, closing a database is the last process in accessing database.

Get Connection String to Access ADO Database

Besides using DAO, a connection string to a database using ADO can also be set. In ADO connection string, we use at least four constants to be set to specify the connection string. They are constStrProvider,constStrDataSource, constStrUserId, and constStrPassword. The constStrProvider Const specifies database provider to be employed, for example: the provider for MS Access database is Microsoft.ACE.OLEDB.12.0. The constStrDataSource Const refers to the database file path. The constStrUserId Const refers to user identity, if the database use access level. If the connection string has a password, then the constStrPassword Const must also be set.

Function to Get Data Type DAO

Data type is the most important property in a field. Data type determines what type of data should be stored in a field of a table and how to present the data in a report. For example, a field with Text data type stores data in a text or numerical character. For a field that has Numeric data type, this field can only stores numerical data.