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

Function to Check If a Table Exists in Access Database

We can create a function to check whether a specific table exist in MS Access Database. There are at least two functions we can create to evaluate the existence of a table in Access, one for external database and the other for current database. Let's name isTableExist function for checking the existence of a table in external database and isTableExistCurrentDbs function for checking the existence of a table in current database.

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.

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.