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

Get Connection String to Access DAO Database

To specify the connection string to a database, we use getDbsConString function. There are, at least, two variables to be set to specify the connection string. They are strProvider and strPassword. The strProvider variable specifies database provider to be employed, for example: the provider for MS Access database is MS Access. If the connection string has a password, then the strPassword variable must also be set. The result of getDbsConString function is a string value.

Function to Retrieve the Precision and Scale Property for Decimal Data Type

The uniqueness of decimal data type in Access are the existing properties named Precision and Scale. Precision property refers to the maximum number of digits in a number. Meanwhile, Scale property is the number of digits to the right of the decimal point in a number. Say for example, 123.45 has a precision of 5 and a scale of 2.

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.