Modules

Modules

What is a Module?

A module is a collection of declarations, statements, and procedures that are stored together as a unit. Modules are very similar to Macros since they are objects that add functionality to the database. However, while you create macros in Access by selecting from a list of macro actions, VBA (Visual Basic for Applications) programming language is used for writing modules.

Modules generally belong to two types:

  1. Class modules
  2. Standard modules.

Class modules contain procedures that are associated with a specific form or report it is attached to. Standard modules contain general procedures that aren't associated with specific objects. Standard modules are listed under Modules in the navigation pane, whereas class modules are not.

Developing Programming Code

The programming language available in Access is Microsoft Visual Basic for Applications, which is nearly identical to Visual Basic 6.0 (VB6). VBA code can be stored in modules and code behind forms and reports. Modules can also be classes.

To manipulate data in tables and queries in VBA, two database access libraries of COM components are provided: Data Access Objects (DAO), which is included in Access and Windows and evolved to ACE in Microsoft Access for the ACCDB database format, and ActiveX Data Objects (ADO). In Access 2007 and beyond, Microsoft added new features to DAO with the name ACEDAO. Beside DAO and ADO, developers can also use OLE DB and ODBC for developing native C/C++ programs for Access. For ADPs and the direct manipulation of SQL Server data, ADO is required. ACEDAO is most appropriate for managing data in Access/Jet databases and the only way to manipulate the complex field types in ACCDB tables.

To know more checkout our blog on how to design a module

  • Judicial Attorney Services Inc.

    You continue to do a job well done with the design, updating and maintenance of our company's program. Work is performed in a timely and professional manner.

    - President

  • A Trucking and Warehousing Company

    Their ability to understand our industry from the ground up - just like one of my coworkers would - is their key differentiator.

    - Customer Service Manager

  • A Services Company

    I needed to believe that Access Programmers could help my company. Their team understood my hesitation and took the time to really understand my business needs.

    - Regional Sales & Operations

  • A Non-Profit Advocacy Firm

    Access Programmers has completed several projects for us - all of which we've been extremely satisfied with. The staff is very knowledgeable, accessible, professional and easy to work with.

    - Information Technology Manager

Contact Us

Please wait...