Learn Microsoft Access Advanced Programming Techniques, Tips and Tricks.

AI Integration in Access VBA and SQL Part 2

Introduction.

Modernizing Microsoft Access applications with AI is not about replacing Access—it’s about extending it into a far more intelligent, responsive, and future-ready system. With the right integration approach, Access can evolve from a traditional desktop database into a smart, AI-assisted application platform.

If you have not yet visited the first part of this Series:  AI Integration in Microsoft Access for VBA Coding Part 1then please visit the Page, then continue.

Intelligent Query & SQL Generation

AI models can translate natural language into SQL queries, dramatically reducing the need for manual query design.

A user types: “Show me dairy products sorted by name.”

AI converts it into a valid Access SQL statement instantly

This is especially powerful for non-technical users and rapid prototyping. Using local LLMs (via tools like Ollama), you can embed this capability directly into Access forms.

AI-Assisted VBA Coding

Writing and maintaining VBA code becomes faster and more reliable with AI assistance.

  • Generate boilerplate code for forms, reports, and modules

  • Debug and refactor existing VBA procedures

  • Auto-document your code for better maintainability

  • Models such as Mistral or Qwen2.5-Coder can run locally and assist developers directly within Access.

Smart Data Entry & Validation

AI can enhance forms with intelligent suggestions and validation:

  • Auto-complete fields based on historical data

  • Detect anomalies (e.g., incorrect pricing, duplicate entries)

  • Suggest corrections in real time

  • This reduces human error and improves data quality significantly.

Natural Language Interface (NLI)

Instead of navigating complex forms and menus, users can interact with Access using plain language.

  • “Add a new customer from Kochi with the pending invoice.”
  • “List the top 10 customers by sales this month.”
  • This can be implemented using prompt-driven interfaces embedded in Access forms.

Automated Reporting & Insights

AI can transform raw data into meaningful summaries:

  • Generate narrative reports (“Sales increased by 12% this quarter…”)
  • Identify trends and outliers automatically
  • Suggest actionable insights

This moves Access from a data storage tool to a decision-support system.

I assume that Ollama, Mistral, and qwen2.5-coder:3b are already installed on your Windows 10 or Windows 11 system. However, relying on Command Prompt–based trial runs is neither practical nor efficient for developing production-quality VBA code or generating SQL statements.

Instead, we can design a user-friendly interface in Microsoft Access to execute AI prompts seamlessly. This approach will enable faster and more consistent generation of Access VBA code and SQL queries, significantly improving overall development efficiency.

A Simple Table with only two Fields.

Table Name: AIPrompt.

Table Structure:

AIPrompt Table
Field Name Field Type
Prompt LongText
Result LongText

A Simple Form in Design View is given below for reference:

frmAIPrompt in Design View

The AIPrompt table is linked to the form frmAIPrompt. The TextBox on the left has both its Control Source and Name properties set to the Prompt field of the table, while the TextBox on the right uses the Result field for its Control Source and Name properties.

A command button is placed above the TextBoxes. In addition, a label with the caption “Working, please wait…” is positioned above the Prompt TextBox. This label remains hidden during normal use. When a prompt is executed by clicking the command button, the label becomes visible and stays on screen until the AI response is written to the Result TextBox.

The Result TextBox is locked to prevent accidental edits, but it remains enabled so users can still select and copy its contents as needed.

In a previous session, we downloaded and installed three different programs on our computers. We will now provide a brief introduction to each of them.

1. Ollama

Ollama is a lightweight runtime and management tool that lets you run large language models (LLMs) locally on your computer without relying on cloud-based AI services. It acts as a bridge between raw model files (such as Mistral or Qwen2.5-Coder) and user applications, making it easy to download, install, run, and interact with these models through simple commands or APIs.

In the context of the Local AI models, Ollama performs several key functions.

First, it manages model lifecycle operations - you can pull (download), list, update, and remove models using straightforward commands like Ollama pull mistral.

Second, it provides a local inference engine, meaning it executes the model of your machine (CPU/GPU) and generates responses in real-time.

Third, it offers a standardized API interface allowing developers to integrate local LLM capabilities into applications such as Microsoft Access, web apps, or automation tools.  

Fourth, Ollama handles model configuration and optimization, including parameters like temperature and context size, simplifying what would otherwise be complex setup tasks. 

Finally, it ensures privacy and offline capability, since all data processing happens locally, an important advantage for sensitive or enterprise data. In short, Ollama transforms complex LLM deployment into a simple, developer-friendly workflow for running AI models locally.

2. Mistral.

The Mistral Large Language Model (LLM) is a family of advanced generative AI models developed by Mistral AI. Designed to understand and generate human language with high efficiency and strong reasoning ability.  Built on transformer-based neural network architecture and can perform a wide range of tasks such as text generation, translation, summarization, and code writing by predicting patterns in language data. 

Additionally, many Mistral models are released with open weight or open-source licenses, making them highly attractive for developers and enterprises seeking customizable, locally deployable AI solutions.

3. Qwen2.5-Coder:3B

 The Qwen2.5-coder:3B model is a compact, code-specialized large language model developed by Alibaba Cloud as part of the broader Qwen2.5 series, designed specifically for programming-related tasks such as code generation, compilation, debugging, and reasoning. It supports multiple programming languages and demonstrates solid performance in real-world development scenarios.

In addition to coding, it retains general language and mathematical reasoning abilities, and its availability in different sizes within the Qwen2.5-Coder family allows developers to choose models based on their computational constraints and application needs.

frmAIPrompt in Form View

Right-click the form image above to open a larger version in a new tab for clearer viewing. The left-side TextBox displays the AI prompt used to generate an Access wrapper class module for a command button control. The required details are entered on separate lines within the prompt.

For simplicity, a basic prompt—such as one for an Access SQL statement or a VBA function—could have been used. However, this more detailed example demonstrates how to structure a multi-step prompt within a TextBox control. Use Ctrl + Enter to insert line breaks and organize the prompt into logical sections on separate lines.

When complete, click the 'AskAI' Command Button to execute the Prompt.

Let us inspect the Command Button Click Event Procedure listed below:

Option Compare Database
Option Explicit

Private Sub cmdClose_Click()
If MsgBox("Close the Form?", vbYesNo + vbInformation, "cmdClose()") = vbYes Then
    DoCmd.Close acForm, Me.Name
End If
End Sub

Private Sub cmdRun_Click()
Dim sPrompt As String
Dim sResult As String
Dim sModel As String
Dim sel_Model As Integer

Const m_Model = "mistral"
Const q_Model = "qwen2.5-coder:3b"

sel_Model = Me!Models


If sel_Model = 1 Then
    sModel = q_Model
Else
    sModel = m_Model
End If

Me.Label5.Visible = True
Me.Repaint

sPrompt = Me!Prompt
' Convert VB Speial characters to
'Java Script Object Notation compatible characters
' Escapes special characters for JSON
    sPrompt = Replace(sPrompt, "\", "\\")        ' Backslash
    sPrompt = Replace(sPrompt, vbCrLf, "\n")     ' Line break (Windows)
    sPrompt = Replace(sPrompt, vbCr, "\n")      'Cariage Return
    sPrompt = Replace(sPrompt, vbLf, "\n")      'Line Feed

sResult = AskLocalAI(sPrompt, sModel)

Me!Result = ""
Me!Result = sResult

Me.Label5.Visible = False
Me.Repaint

Me.Result.SetFocus

End Sub


At the start of the procedure, the selected LLM model is initialized in the sModel variable. The AI prompt, stored in a Long Text field, may include special characters such as line breaks (Ctrl+Enter), double quotes, backslashes, and non-printable characters like carriage return and line feed (vbCrLf). Before submitting the prompt to the chosen AI model, these characters must be properly encoded into a valid JSON string—the format required by the AI for processing.

Note: The response from the AI model is returned in JSON format. The required result must be extracted from the JSON string, specifically from the content between the response and end tags. After reformatting the AI prompt, the AskLocalAI() function is invoked, with the prompt and model name passed as parameters. Once the response is returned by the AskLocalAI() function, it replaces any existing content and is inserted into the Result TextBox on the form. 

The AI workflow itself is straightforward: clearly describe the task you want the AI to perform in the Prompt TextBox, ideally in a step-by-step manner. Providing detailed instructions yields more accurate and useful results than a brief, one-line request such as: “Create an SQL query to display Employees’ Last Name, First Name, and City from the Employees table.”

Note: Avoid running the same Task with minor changes repeatedly.

You should continuously refine your ability to write effective AI prompts tailored to your specific task. Be as detailed and explicit as possible when describing your requirements, since clearer instructions lead to more accurate and useful outputs.

When requesting VBA or SQL solutions, explicitly specify that you need Microsoft Access VBA or Microsoft Access SQL in your prompt. This ensures the generated code uses the correct syntax and conventions for Microsoft Access.

If you request only VBA code without specifying the platform, it is typically assumed to be for Microsoft Excel. As a result, the code provided may not be compatible with Microsoft Access.

The AskLocalAI() Function

Option Compare Database
Option Explicit
 
 Function AskLocalAI(aiPrompt As String, ModelName As String) As String

    Dim http As Object
    Dim JSON As String
    Dim Response As String
    Dim safePrompt As String
    Dim txtResponse As String


    Set http = CreateObject("MSXML2.XMLHTTP")
    
'Escape Double Quptes in Prompt (important)
    safePrompt = Replace(aiPrompt, """", "\""") 'double quote to JSON escape Code \"

    JSON = "{""model"":""" & ModelName & """,""prompt"":""" & safePrompt & """,""stream"":false}"

    http.Open "POST", "http://localhost:11434/api/generate", False

    http.setRequestHeader "Content-Type", "application/json"

    http.Send JSON

    Response = http.responseText
    
    txtResponse = ExtractText(Response)
    
'Replace escape Code with VBA codes
txtResponse = Replace(txtResponse, "\n", vbNewLine)
txtResponse = Replace(txtResponse, "\u0026", "&")
txtResponse = Replace(txtResponse, "\u003c", "<")
txtResponse = Replace(txtResponse, "\u003e", ">")
txtResponse = Replace(txtResponse, "\", vbNull)

    AskLocalAI = txtResponse

 End Function

The statement: Set http = CreateObject("MSXML2.XMLHTTP") creates an Instance of the MSXML2.XMLHTTP COM Object.

This object is primarily used to send HTTP requests to servers and receive responses (such as HTML, XML, or JSON data) without a web browser, making it a cornerstone API interaction and automated web tasks in VBA.

The Prompt that was passed to AskLocalAI() is further checked for Double quotes (") in the Prompt; if found, then changes it to (\") JSON Escape code.

Note: JSON escape codes are backslash-prefixed sequences used to represent characters within a JSON string that would otherwise break the data's structure or are impossible to type directly.  Because JSON strings must be enclosed in double quotes, any literal double quote inside the string must be escaped so the JSON Parser does not mistake it for the end of the string

Next, the Input information, the Large Language Model Name, and the user's Task Prompt values are validated, formatted, and saved in the JSON String Variable, ready to pass to the Local Cloud Service.

The next two steps, the Local Host Cloud is open for API Service and initialized to accept the JSON input.

The statement: http.Send JSON, transmit the JSON input to the user-selected LLM Model for action. 

We will get the response from the AI Model through the statement: Response = http.responseText

The Response variable may contain a significant amount of extraneous information, such as timestamps indicating when the request was received, action logs, and other system-generated metadata. This is typically followed by the actual response to the requested information, which often ends with the word “Done,” and may then be followed by additional system log details.

Note: We will explore JSON Syntax and Structure in detail next week.

The graphical representation of the Response looks like the following:

Log--------- Response >>>>>>>>>>>>>>>>>Done------------Log

We are interested only in retrieving the information between the words: Response and Done, from within the JSON Response String. 

There is a small Function to do that job. The VBA Code is given below.

Private Function ExtractText(ByVal jsonText As String) As String
    Dim startPos As Long
    Dim endPos As Long
    
    startPos = InStr(jsonText, """response"":""") + 12
    endPos = InStr(startPos, jsonText, """,""done""")
    
    If endPos > startPos Then
        ExtractText = Mid(jsonText, startPos, endPos - startPos)
    Else
        ExtractText = jsonText
    End If
End Function


The first statement in the ExtractText() function searches for the tag "response":. If found, it calculates the character position immediately after this tag by adding the length of "response": plus one (i.e., 12) and saves it in the startPos variable. This value marks the starting point of the AI-generated output.

The next statement searches for the "done" tag, which indicates the end of the relevant output, within the JSON string, and stores its position in the endPos variable. With both the starting and ending positions identified, the function can extract the prompt result from the JSON string.

The following statement validates these positions. If they are valid, it extracts the response text (from startPos to endPos) and returns the result. Otherwise, it returns the entire JSON string—including all extraneous details—to the calling function AskLocalAI().

When the prompt response is extracted, it may still contain JSON-encoded characters (such as "\u0026" for & and "\u003c" for <) and similar codes. A series of additional statements is included to replace these escape sequences with their corresponding VBA-compatible characters.

Finally, the processed response is returned to the cmdAskAI() command button click event procedure, where the result is used to populate the Result TextBox, replacing any existing content. 

The 'Working, Please wait...' label disappears. If the process takes too much time your System may hang for some time. Don't panic, give it time, and it will return with the result.

Prompt Engineering Toolkit for Access Developers

Reusable AI Prompts for SQL and VBA

  1. Universal System Prompt (Use Everywhere)

    You are a Microsoft Access expert.
    
    Generate only valid Microsoft Access SQL or VBA code.
    
    Do not include explanations, comments, or alternative options.
    
    Follow proper syntax and best practices.
    
  2. SQL Query Templates

    Basic SELECT Query

    You are a Microsoft Access expert.
    
    Generate only valid Microsoft Access SQL or VBA code.
    
    Do not include explanations, comments, or alternative options.
    
    Follow proper syntax and best practices.
    
    Task: Create a Microsoft Access SQL SELECT query
    
    Table: [TableName]
    
    Fields: [Field1], [Field2], [Field3]
    
    Filter: [Condition]
    
    Sort: [Field ASC/DESC]
    
    
    Return only SQL.
    
    

    JOIN Query

    You are a Microsoft Access expert.
    
    Generate only valid Microsoft Access SQL or VBA code.
    
    Do not include explanations, comments, or alternative options.
    
    Follow proper syntax and best practices.
    
    Task: Create a Microsoft Access SQL query with JOIN
    
    Tables:
    
    - Customers (CustomerID, Name)
    
    - Orders (OrderID, CustomerID, Amount)
    
    Requirement:
    
    Join Customers and Orders
    
    Show Customer Name and Total Order Amount
    
    
    Return only SQL.
    
    

    TOP N Query

    Task: Create a Microsoft Access SQL query
    
    
    Table: Orders
    
    Fields: CustomerID, Amount
    
    Requirement:
    
    Return top 5 customers by total Amount
    
    
    Return only SQL.
    
    

    PARAMETER Query

    Task: Create a parameter query in Microsoft Access
    
    
    Table: Orders
    
    Fields: OrderID, OrderDate, Amount
    
    
    Requirement:
    
    Prompt user for Start Date and End Date
    
    
    Return only SQL.
    
  3. VBA Code Templates

    Simple Function

    Task: Write a VBA function in Microsoft Access
    
    
    Requirement:
    
    Open a DAO Recordset for table Customers
    
    Loop through records
    
    Print Customer Name to Immediate Window
    
    
    
    Return only VBA code.
    
    

    Form Event Procedure

    Task: Write VBA code for a Form Button Click event
    
    Requirement:
    
    On click:
    
    - Open query "qrySalesReport"
    
    - Display results
    
    Return only VBA code.
    
    

    Error Handling Template

    Task: Write a VBA procedure with error handling
    
    
    Requirement:
    
    Open a recordset
    
    Handle runtime errors properly
    
    Show error message
    
    
    Return only VBA code.
    
    

    Reusable Class Module

    Task: Create a VBA class module
    
    Requirement:
    
    Class Name: clsCustomer
    
    Properties:
    
    - CustomerID
    
    - CustomerName
    
    
    Include Property Let/Get procedures
    
    
    
    Return only VBA code.
    
    
  4. Debugging Templates

    Fix SQL Query

    Task: Correct the following Microsoft Access SQL query
    
    
    SQL:
    
    [Paste SQL here]
    
    
    Return corrected SQL only.
    

    Fix VBA Code

    Task: Debug the following VBA code
    
    
    Code:
    
    [Paste Code here]
    
    
    Fix errors and return corrected code only.
    
    
  5. Explanation Templates (Learning Mode)

    Explain SQL

    Explain the following Microsoft Access SQL query step by step:
    
    
    [Paste SQL]
    
    
    
    Keep explanation simple and structured.
    
    

    Explain VBA

    Explain the following VBA code:
    
    [Paste Code]
    
    Describe what each section does.
    
    
  6. Database-Aware Smart Template (Advanced)

    Task: Generate SQL based on database structure
    
    
    Tables:
    
    Customers(CustomerID, Name, City)
    
    Orders(OrderID, CustomerID, Amount)
    
    
    Requirement:
    
    Find top 3 customers by total order amount
    
    
    Return only Microsoft Access SQL.
    
    
  7. Output Control Add-on (Very Important)

    Append this to any prompt:

    Rules:
    
    - Output only code
    
    - No explanation
    
    - No comments
    
  8. Recommended Parameter Settings.

    {
    
      "temperature": 0.2,
    
      "max_tokens": 150
    
    }
    

How to Use This Library

  1. Pick a template
  2. Replace placeholders
  3. Send to your local AI
  4. Copy → Test → Refine

Key Insight for Readers

The quality of AI output depends more on the prompt structure than the model itself.

Will continue Next Week.

Downloads:


Demo Databases Download.


  1. AI Integration in Microsoft Access Part 1
  2. Wrapper Class Module Creation Wizard-31
  3. wrapper-class-template-wizard-v2

Share:

AI Integration in Microsoft Access for VBA Coding Part 1

Local AI for Microsoft Access SQL and VBA Coding - Part 1.

The idea of using Artificial Intelligence within Microsoft Access may sound complex at first, but recent advancements have made it surprisingly accessible—even on a standard Windows 10/11 PC. With lightweight local AI runtime, such as 'Ollama' and efficient coding-focused models like Qwen2.5-Coder, Access developers can now experiment with AI-assisted SQL and VBA generation directly from within Microsoft Access, without relying on cloud services.

This first step is intentionally simple: install Ollama, download a compact model such as qwen2.5-coder:3b, and run a few test prompts. For example, you can ask the model to generate an SQL query to retrieve top customers or to write a basic VBA function to open a recordset. Within seconds, the AI responds with structured output that you can study, refine, and adapt into your own applications. This hands-on approach helps demystify AI and demonstrates its immediate practical value.

From a hardware perspective, one of the key advantages of smaller models like Qwen2.5-Coder (3B) is that they are optimized for modest systems. A modern dual-core or quad-core processor (Intel i5/Ryzen 5 or equivalent) with at least 8 GB RAM can run such models comfortably for basic tasks, although 16 GB RAM is recommended for smoother performance and multitasking. Since the model runs locally, you also benefit from improved data privacy and independence from internet connectivity.

At this stage, the objective is not to build a full integration, but to gain familiarity and confidence. By interacting with the model through simple prompts in the Command Prompt, developers begin to understand how AI interprets instructions, generates SQL syntax, and structures VBA procedures. This foundational experience is essential before moving on to deeper integration within Access using VBA and API calls.

In the sections that follow, we will walk through the installation steps, demonstrate sample prompts, and explore how even a basic setup can assist in writing queries and VBA code. Once you see how quickly AI can respond to your development needs, you may begin to view it not as a replacement but as a reliable assistant in your everyday Access workflow.

AI Environment for Microsoft Access Developers.

Setting up a local AI environment for Microsoft Access development is a powerful idea—especially for automating SQL generation, VBA code assistance, and database analysis without relying on cloud services.

Here’s a clear, practical step-by-step guide tailored to the development workflow.

1. Choose a Local AI Engine

We need a locally running LLM (Large Language Model).

Recommended options:

  • Ollama (Best for simplicity)

  • LM Studio (GUI-based)

  • GPT4All

Best choice for developers: Ollama (lightweight + API support)

2. Install Ollama (Core Engine)

Steps:

  • Download OllamaSetup.exe for Windows from: https://ollama.com

  • Install OllamaSetup.exe

  • Verify installation:

Open Windows Command Prompt and Type:

Download and Install the Large Language Model: Mistral, like ChatGPT. The 'pull' command downloads the model from source.

C:\Users\HP>ollama pull mistral C:\Users\HP>ollama run mistral

Download and Install the SQL and Code-generating AI model: qwen2.5-coder:3b with 3 billion parameters. The model is downloaded and installed with the following command. 

C:\Users\HP>ollama pull qwen2.5-coder:3b C:\Users\HP>ollama run qwen2.5-coder:3b
'Display the Installed Model's information.
C:\Users\HP>ollama --version ollama version is 0.20.7 C:\Users\HP>ollama list NAME ID SIZE MODIFIED qwen2.5-coder:3b f72c60cabf62 1.9 GB 7 weeks ago - if installed mistral:latest 6577803aa9a0 4.4 GB 7 weeks ago - if installed C:\Users\HP>

The VBA code-generating AI is installed on your machine. You need an Intel i5 or i7 Machine for better performance.

>>>      The Coder AI 'prompt' input line appears. Let us try it out in the Command Prompt.

Type /? or /help for help

>>> /?  

Available Commands:

  /set            Set session variables

  /show           Show model information

  /load    Load a session or model

  /save    Save your current session

  /clear          Clear session context

  /bye            Exit

  /?, /help       Help for a command

  /? shortcuts    Help for keyboard shortcuts

Use """ to begin a multi-line message.


>>> /show

Available Commands:

  /show info         Show details for this model

  /show license      Show model license

  /show modelfile    Show Modelfile for this model

  /show parameters   Show parameters for this model

  /show system       Show system message

  /show template     Show prompt template


>>> /show info

  Model

    architecture        qwen2

    parameters          3.1B

    context length      32768

    embedding length    2048

    quantization        Q4_K_M



  Capabilities

    completion

    tools

    insert

  System

    You are Qwen, created by Alibaba Cloud. You are a helpful assistant.



  License

    Qwen RESEARCH LICENSE AGREEMENT

    Qwen RESEARCH LICENSE AGREEMENT Release Date: September 19, 2024

    ...



>>> Hello?

Hello! How can I assist you today?

'SQL SELECT Query creation AI PROMPT:

>>> """Create SELECT SQL

... Table: Employees

... Fields: FirstName, LastName, City, Jobtitle

... Filter: Jobtitle = "Sales Representative"

... Sort: LastName"""

Certainly! Here is the SQL query that selects employees with the job title "Sales Representative", 
filters them by city, and sorts the results by last name:


```sql

SELECT FirstName, LastName, City, Jobtitle

FROM Employees

WHERE Jobtitle = 'Sales Representative'

ORDER BY LastName;

```

This query will return a list of sales representatives from all cities, sorted alphabetically by their last names.

AI Prompt for creating a VBA Function to calculate the Volume of a tree log.

Type the following Prompt on the command line exactly as shown below. Start typing three quote characters next to each other, then the Prompt text in multiple lines, by pressing the Enter Key on each line, and type 3 quotes at the end of the AI Prompt finish line, indicating the end of the Prompt, and press Enter Key to execute.

>>> """Create an MS Access VBA Function to calculate the Volume of a Tree Log
... Input Parameter values: Circumference value in Inches
... Log Length value: in Feet"""

To create an MS Access VBA function that calculates the volume of a tree log using the provided parameters, you need to consider that the volume is calculated by assuming the cross-sectional area of the log is a circle. Here's a simple function that does this:


1. Open Microsoft Access.

2. Press `Alt + F11` to open the VBA editor.

3. In the Project Explorer, right-click on "Microsoft Access Objects" and select "Add > Module".

4. Copy and paste the following code into the module:


```vba

Function CalculateVolumeOfLog(circumference As Double, logLength As Double) As Double

    ' Define the value of pi

    Dim pi As Double

    pi = 3.141592653589793


    ' Calculate the radius from the circumference

    Dim radius As Double

    radius = circumference / (2 * pi)


    ' Convert log length from feet to inches

    Dim logLengthInInches As Double

    logLengthInInches = logLength * 12


    ' Calculate the volume of the log

    Dim volume As Double

    volume = pi * (radius ^ 2) * logLengthInInches


    ' Return the calculated volume

    CalculateVolumeOfLog = volume

End Function

```

### Explanation:

- **Step 1**: The `pi` variable is set to its approximate value.

- **Step 2**: The radius \( r \) is calculated using the circumference in inches.

- **Step 3**: The log length in feet is converted to inches by multiplying it by 12.

- **Step 4**: The volume is calculated using the formula for the volume of a cylinder, where the radius is in inches, and the log length is in inches.

>>> /Exit

C:\Users\HP>

NB: Click and drag over the required lines of content in the Command Prompt area and press Ctrl+C to copy. Paste it into a Text File or into the Global Module of  Access. Copy and paste the SQL into the Query SQL Editing Window. That is for now. We will use better methods when run from within MS Access.

The Machine hardware, Memory recommendation, and suitable Models.

Running Qwen2.5-Coder:3B locally on a Windows 10/11 PC (via Ollama) is quite feasible—even without a GPU—but the experience depends heavily on your hardware.

Let’s make it practical and tailored for smooth day-to-day use.

Minimum vs Recommended Hardware

Minimum (Will run, but slower)

  • CPU: Dual-core (Intel i3 / Ryzen 3)

  • RAM: 8 GB

  • Storage: ~6–8 GB free (model + cache)

  • GPU: Not required

Expect:

  • Slower responses (3–10 seconds per reply)

  • Occasional lag with longer prompts

Recommended (Smooth experience)

  • CPU: 4–8 cores (Intel i5 / Ryzen 5 or better)

  • RAM: 16 GB

  • Storage: SSD with 10+ GB free

  • GPU: Optional (integrated GPU is fine)

Expect:

  • Fast responses (1–3 seconds typical)

  • Comfortable coding + debugging workflow

Optimal (Best performance)

  • CPU: 8+ cores (Intel i7 / Ryzen 7)

  • RAM: 32 GB

  • Storage: NVMe SSD

  • GPU (optional but powerful):

  • NVIDIA with 6–8 GB VRAM (e.g., RTX 3060)

Expect:

  • Near-instant responses

  • Handles long prompts + large codebases easily

Model Size & Memory Usage

  • Qwen2.5-Coder:3B (quantized via Ollama):

  • Disk size: ~2–4 GB

  • RAM usage during run: ~4–6 GB

So your system must have extra RAM beyond this for smooth multitasking.

Key Performance Factors

  1. RAM (Most Important)

    • Less RAM → swapping → slow performance

    • 16 GB is the sweet spot

  2. SSD vs HDD

    • SSD = fast model loading

    • HDD = noticeable delay

  3. Strong recommendation: Use SSD

  4. CPU Threads

    • More cores = faster token generation

    • LLMs are CPU - parallel friendly

  5. GPU (Optional Boost)

    • Ollama can use a GPU, if available

    • Not required for 3B models

Realistic Performance (What You’ll Feel)

Hardware Experience

8GB RAM + HDD Slow, sometimes frustrating

8GB RAM + SSD Usable, but limited

16GB RAM + SSD - Smooth & practical

32GB + GPU - Excellent


For MS Access + Coding Use Case

  • Generate SQL queries

  • Work with VBA

  • Write structured logic in Class Modules.

You’ll benefit from:

  • 16 GB RAM (minimum target)

  • SSD (mandatory)

  • Mid-range CPU (i5/Ryzen 5+)

Final Recommendation

If you’re planning a stable setup:

Best value configuration:

  • 16 GB RAM

  • SSD

  • Intel i5 / Ryzen 5

This will run Qwen2.5-Coder:3b smoothly without frustration

NB: If the 3b model hangs the Access System in the middle of a Code generating run, due to hardware limitations, be patient, it completes the work in the background and comes out. Consider installing the 1b Model: qwen2.5-coder:1b (the lightweight 1 billion parameters Model).

Will Continue >>> Next Week.


  1. Wrapper Class Module Creation Wizard-31
  2. wrapper-class-template-wizard-v2
Share:

Group-Wise Ranking Using Class Module

Group-Wise Ranking in Microsoft Access Using a Class Module

A Reusable Object-Oriented Approach.

In earlier articles, we explored how to prepare a Rank List in Microsoft Access using procedural VBA. While that method works reliably, modern Access application design benefits greatly from encapsulating business logic inside Class Modules.

Unlike database engines such as Microsoft SQL Server, which provide built-in ranking functions like RANK() and ROW_NUMBER(), Microsoft Access does not natively support group-wise ranking in SQL.

This article demonstrates how to implement ranking logic using a dedicated class module, making the solution:

  • Reusable

  • Maintainable

  • Extensible

  • Compatible with local and linked tables

Why Use a Class Module?

Moving ranking logic into a class provides:

✔ Encapsulation of ranking behavior.

✔ Reusability across forms, reports, and automation tasks.

✔ Cleaner separation of concerns.

✔ Easier debugging and future enhancement.

This design is especially useful in structured Access applications that follow modular architecture principles.

Design Overview

The class will:

  1. Accept a source table or query.

  2. Accept grouping and sorting fields.

  3. Accept ranking style (Dense / Competition / Sequential).

  4. Execute ranking.

  5. Update a designated Rank field.

Step 1: Create the Class Module.

Create a new Class Module and name it:

clsRankList

Step 2: Insert the Following Code.

Option Compare Database

Option Explicit


Private mSource As String

Private mGroupField As String

Private mValueField As String

Private mRankField As String

Private mRankingType As String


Public Property Let SourceTable(ByVal vValue As String)

    mSource = vValue

End Property


Public Property Let GroupField(ByVal vValue As String)

    mGroupField = vValue

End Property


Public Property Let ValueField(ByVal vValue As String)

    mValueField = vValue

End Property


Public Property Let RankField(ByVal vValue As String)

    mRankField = vValue

End Property


Public Property Let RankingType(ByVal vValue As String)

    mRankingType = UCase(vValue)

End Property


Public Sub ExecuteRanking()

    Dim db As DAO.Database

    Dim rs As DAO.Recordset

    Dim strSQL As String


    Dim CurrentGroup As Variant

    Dim PreviousValue As Variant

    Dim RankNo As Long

    Dim SkipCount As Long


    If mRankingType = "" Then mRankingType = "DENSE"

    Set db = CurrentDb


    strSQL = "SELECT * FROM [" & mSource & "] " & _

             "ORDER BY [" & mGroupField & "], [" & mValueField & "] DESC;"


    Set rs = db.OpenRecordset(strSQL, dbOpenDynaset)

    If rs.EOF Then Exit Sub

    rs.MoveFirst

    CurrentGroup = Null

    PreviousValue = Null

    RankNo = 0

    SkipCount = 0

    Do While Not rs.EOF        

        If Nz(rs(mGroupField)) <> Nz(CurrentGroup) Then        

            CurrentGroup = rs(mGroupField)

            RankNo = 1

            SkipCount = 1

            PreviousValue = rs(mValueField)           

        Else            

            Select Case mRankingType

                Case "DENSE"

                    If rs(mValueField) <> PreviousValue Then

                        RankNo = RankNo + 1

                    End If            

                Case "COMPETITION"

                    If rs(mValueField) <> PreviousValue Then

                        RankNo = SkipCount

                    End If               

                Case "SEQUENTIAL"

                    RankNo = RankNo + 1                 

            End Select            

            SkipCount = SkipCount + 1

            PreviousValue = rs(mValueField)

        End If        

        rs.Edit

        rs(mRankField) = RankNo

        rs.Update       

        rs.MoveNext        

    Loop

    rs.Close

    Set rs = Nothing
    Set db = Nothing   

End Sub

Step 3: Using the Class

From a standard module, form, or automation routine:

Dim objRank As New clsRankList

With objRank

    .SourceTable = "tblStudentMarks"

    .GroupField = "Class"

    .ValueField = "TotalMarks"

    .RankField = "Rank"

    .RankingType = "COMPETITION"

    .ExecuteRanking

End With

Set objRank = Nothing

Supported Ranking Types

RankingType Behavior

DENSE 1, 2, 2, 3

COMPETITION 1, 2, 2, 4

SEQUENTIAL 1, 2, 3, 4

If no ranking type is specified, DENSE is used by default.

Advantages of This Approach.

  1. Clean Object-Oriented Design

    Encapsulates ranking behavior into a single reusable object.

  2. Compatible with Linked Tables

    Uses dbOpenDynaset, so it works with ODBC sources.

  3. Extensible

    Future enhancements may include:

    • Multiple group levels

    • Dynamic ORDER BY clauses

      Returning ranked recordsets instead of updating tables

      Error handling classes

  4. Integration-Friendly

    Works well with form wrappers and structured automation routines.

Performance Notes

  • Efficient for moderate datasets.

  • Ensure indexes exist on GroupField and ValueField.

  • For very large datasets, consider server-side ranking.

Final Thoughts

Encapsulating ranking logic inside a class module elevates the solution from a procedural workaround to a structured, reusable component.

    For developers who build modular Microsoft Access applications, this approach promotes:

  • Clean architecture

  • Reusability

  • Maintainability

  • Professional-grade design

--oOo--

  1. Auto-numbering in Query Column
  2. Product Group Sequence with Auto-Numbers.
  3. Auto-Number with Date and Sequence Numbers-1.
  4. Auto-Number with Date and Sequence Numbers-2.
  5. Auto-Number in Query Column Version-2.
Share:

Wrapper Class Template Wizard V2

 Streamlining Form Module Code in Standalone Class Module.

Class Module Template Creation Wizard V2.

The earlier version of the Class Module Wizard was a testing platform for creating Wrapper Class Module templates. Although it served its purpose, the procedure adopted there is somewhat semi-automatic, and I am not satisfied with that either. 

This improved Version 2.0 of the Wizard can create several Class Module Templates for different Object Types in your form. This Version creates approximately 10 frequently used Object Wrapper Class Module Templates based on your selection at a time.

The Screenshot of the Class Template Wizard is given below:

The ListBox's Source Data is from the 'ListItems' Table. The Source Table Image is given below.

The Table has ten Records with six columns of data, but only the first three columns are shown on the ListBox.

(1) The RecordID - for easier retrieval of Wizard Function Parameters.
(2) The Field/Control list File Name for creating on Disk - The files will be created in the Current Project Folder.
(3) The Class Module Template Name -  suffixed with the word '_Template' is preferred, not mandatory.

The following three Columns of data are used by the Wizard.

(4) The Wizard Function that creates the Class Template - Applicable for all Types of Objects.
(5) The Object TypeName - self-explanatory.
(6) Object Short Name - you may change it to a more descriptive Name if required.

How to Run the WrapperClassWizard from within a Database?

Place the WrapperClass_Wizard.accdb database into a Trusted Folder. 

Open your Database and open the VBE Window.

Select References... from the Tools menu, find the Wizard Database, attach, and select to add it to the selected List of Library Files.

Create a SELECT Query in your Project with the name ListItemsQ using the following SQL:

SELECT ListItems.*
FROM ListItems IN 'D:\DEMO\Code2\WrapperClass_Wizard.accdb';

Change the Folder Path to the location of the WrapperClass_Wizard.accdb correctly.

You can create class module templates with the main object declarations (e.g., TextBox and Form, or any other Control and Form) with their property procedures for up to 10 of the most frequently used controls on the form.

Additionally, you can add a sample Click Event Subroutine Code foundation with all the Data Field Names (eg, TextBox and ComboBox Names) collected from the Form. To achieve this, insert a few lines of code (shown in red) in the Class_Init() Subroutine listing below, to collect each Control Type in separate Groups from the Form and save them into their designated text files on disk when the Form is in open state. 

Note: If you plan to implement this Data Field Name saving procedure for two or more forms, the contents of this text file on Disk will be overwritten with the last open Form's Field Names. 

For creating the TextBox or ComboBox sample Click Event Subroutine for a particular Form, open the Form with its Class_Init() Subroutine Code Lines in red, for a few seconds, and close it before running the Class Template creation Wizard.

I recommend this procedure to collect the Data field names on the Form using Code, because all of them are inserted from the data source Table/Query.  Memorizing all their names correctly for easier event subroutine coding is impractical. 

The code lines (marked in Red) are inserted into the Class_Init() subroutine to write out the Category-wise Field Names into their respective Files on Disk. All TextBox Field Names in one Text File, ComboBox Field Names in another, and so on. Below that is the Class_Init() Subroutine in the Class_ObjInit Class Module of the Employees Form, implemented with this procedure.

Option Compare Database
Option Explicit

Private txt As Data_TxtBox
Private Cbo As Data_CboBox
Private cmd As Data_CmdButton

Private Coll As New Collection
Private Frm As Form

'--------------------------------------------------------------------
'Streamlining Form Module Code
'in Stand-alone Class Modules
'With Reusable Code
'--------------------------------------------------------------------
'The 'WrapperClassWizard.accdb' attached to this Database
'Check: Tools--> References...
'--------------------------------------------------------------------
'1. The 'Class_ObjInit' Class saves TxtBox/Field Names, Command Button,
'ComboBox Names, and others from the Open Form into TextBoxFields.txt,
'CmdButtonList.txt & ComboBoxList.txt files in the same Database Folder.
'
'2. The 'WrapperClassWizard.accdb' must be attached to the
'Current Project to open up the Wizard Form by running
'the Function: OpenClassWizard() from within a Command button Click.
'
'3. The Wizard Reads the Field Names from tbe above Text Files.
'
'4. The Wizard will use the Field/Control Names(if any) for the sample
'Event Subroutine in the Template. If the file is empty then it will
'create a sample Evet Subroutine without the Control names.
'
'5. This saves Coding time otherwise spent on creating a
'New Wrapper Class Module from scratch and picking the
'Field Names and other Control Names correctly
'From the Form for Event Subroutines.
'--------------------------------------------------------------------
'Author:  a.p.r. pillai
'Date  :  20/06/2024
'Remarks: with Ready-made Data Entry Events Handler
'       : in the Wrapper TextBox Class Module
'       : Suitable for Columnar, Tabular or DataSheet Form
'Rights:  All Rights(c) Reserved by www.msaccesstips.com
'--------------------------------------------------------------------

Public Property Get o_Frm() As Form
    Set o_Frm = Frm
End Property

Public Property Set o_Frm(ByRef vFrm As Form)
    Set Frm = vFrm

    Class_Init
End Property

Private Sub Class_Init()
Dim ProjectPath As String
Dim txtPath As String
Dim ComboPath As String
Dim FieldListFile As String
Dim ComboBoxList As String
Dim ctl As Control

On Error GoTo ClassInit_Err

Const EP = "[Event Procedure]"

'Save TextBox & CombBox Names into separate Text Files
'for creating Event Subroutines in the Templates
ProjectPath = CurrentProject.Path & "\"

FieldListFile = DLookup("FieldListFile", "ListItemsQ", "ID = " & wizTextBox)
ComboBoxList = DLookup("FieldListFile", "ListItemsQ", "ID = " & wizComboBox)

txtPath = ProjectPath & FieldListFile
ComboPath = ProjectPath & ComboBoxList

Open txtPath For Output As #1 'TextBoxFields.txt for writing
Open ComboPath For Output As #2 'ComboBoxList.txt

'Instantiate the 'Data_txtBox' Class for each TextBox
'on the Form for streamlined Event Procedures Coding
For Each ctl In Frm.Controls
    Select Case TypeName(ctl)
        Case "TextBox"
    Print #1, ctl.Name 'write Field/TextBox Name in TextBoxFields.txt File
            Set txt = New Data_TxtBox
            Set txt.m_Frm = Frm
            Set txt.m_txt = ctl
            
'//Colin Riddington Technique: Highlighting BackColor on GotFocus
                txt.m_txt.BackColor = 62207 'yellow
                txt.m_txt.BackStyle = 0
    
                txt.m_txt.BeforeUpdate = EP
                txt.m_txt.OnDirty = EP
                
                Coll.Add txt 'Add Data_TxtBox Class Instance to Collection
                Set txt = Nothing 'Reset txt object
      
      Case "CommandButton"
           Set cmd = New Data_CmdButton
            Set cmd.Obj_Form = Frm
            Set cmd.cmd_Button = ctl
                
                cmd.cmd_Button.OnClick = EP
                
                Coll.Add cmd
                Set cmd = Nothing
                
      Case "ComboBox"
    Print #2, ctl.Name 'write ComboBox Names in ComboBoxList.txt File
            Set Cbo = New Data_CboBox
            Set Cbo.m_Frm = Frm
            Set Cbo.m_Cbo = ctl
    
'//Colin Riddington Technique: Highlighting BackColor on GotFocus
                Cbo.m_Cbo.BackColor = 62207
                Cbo.m_Cbo.BackStyle = 0
                
                Cbo.m_Cbo.BeforeUpdate = EP
                Cbo.m_Cbo.OnDirty = EP
                
                Coll.Add Cbo
                Set Cbo = Nothing
                
        Case "ListBox"
            
    End Select
Next
'Close all files
Close #1
Close #2

ClassInit_Exit:
Exit Sub

ClassInit_Err:
MsgBox Err & ": " & Err.Description, , "Class_Init()"
Resume ClassInit_Exit
End Sub

Private Sub Class_Terminate()
While Coll.Count > 0
    Coll.Remove 1
Wend
Set Coll = Nothing

End Sub

The red lines are inserted in the required locations to collect the Data Field and ComboBox Names and record them in separate Text Files in the Project Folder as Input to the Class Module creation Wizard. Similarly, you can insert related Code lines for other Types of Controls on the Form.

The Wizard will look for these files on the disk and check their contents. If control names are found, they will be used for building a sample Click Event Subroutine after the main object declarations and property procedure lines of code.

If the above lines are embedded in the Class_Init() subroutine, we should open and keep the Employees Form for a few seconds and close it before running the wizard options. This will create the controls list in their respective text files, using the predefined file names taken from the wizard table ListItems, through the Select Query ListItemsQ.

The TextBoxFields.txt File contents created from the Employee Form Field Names are listed below for reference:

ID
Company
Last Name
First Name
E-mail Address
Job Title
Address
City
State/Province
ZIP/Postal Code
Country/Region

The Sample Click Event Subroutine Structure Code.

The sample Click Event Subroutine Code structure, created using the Field Names from the TextBoxFields.txt File, is given below.
Private Sub txtBox_Click()
   Select Case txtBox.Name
     Case "ID"
        ' Code
 
     Case "Company"
        ' Code
 
     Case "Last Name"
        ' Code
 
     Case "First Name"
        ' Code
 
     Case "E-mail Address"
        ' Code
 
     Case "Job Title"
        ' Code
 
     Case "Address"
        ' Code
 
     Case "City"
        ' Code
 
     Case "State/Province"
        ' Code
 
     Case "ZIP/Postal Code"
        ' Code
 
     Case "Country/Region"
        ' Code
 
 
   End Select
End Sub

Remove the unwanted Control Names from the List if no Events are invoked from those controls.

Opening the ClassWizard Form.

Open the ClassWizard Form by calling the Function OpenClassWizard() from your Project through a Command Button Click Event Subroutine, with the following sample VBA Code lines:

Private Sub Command25_Click()
	VBE.CodePanes.Item(1).show
	OpenClassWizard VBE.ActiveVBProject.Name
End Sub

The OpenClassWizard() Function Code is given below.

Note: You should not create a Function with the same name: OpenClassWizard() in your Project, where the Wizard is attached as a Library database.

Dim ProjectName As String

'Public Function to Open the Wizard Form
'from the Host Application
Public Function OpenClassWizard(ByVal projName As String)
On Error GoTo OpenClassWizard_Err

ProjectName = projName
DoCmd.OpenForm "ClassWizard", acNormal
    
OpenClassWizard_Exit:
Exit Function

OpenClassWizard_Err:
MsgBox Err & ": " & Err.Description, , "OpenClassWizard()"
Resume OpenClassWizard_Exit
End Function

When the Wizard Form is open in your Application Window, select one or more items from the List of Control Types, like TextBox, Command Buttons, or any other Class Module you need, and click the Run Wizard Command Button. 

The ClassWizard Form Module Code:

Option Compare Database
Option Explicit

Private obj As New Wiz_ObjInit

Private Sub Form_load()
    Set obj.O_Form = Me
End Sub

Private Sub Form_Unload(Cancel As Integer)
    Set obj = Nothing
End Sub

The Wiz_ObjInit Intermediary Class Module VBA Code.

Option Compare Database
Option Explicit

Private Lst As Wiz_ListBox
Private oFrm As Access.Form
Private cmd As Wiz_CmdButton
Private Coll As New Collection
'----------------------------------------------------------
'Streamlining Form Module Code in Stand-alone Class Modules
'With Reusable Structured Event Subroutine Coding.
'----------------------------------------------------------
'Event Procedure Coding in Standalone Class Module is now
'made easier with Readymade Object Wrapper Class Templates
'Demo Event Subroutine is created with the Control Names.
'----------------------------------------------------------
'Program: Wrapper Class Template Wizard
'Author:  a.p.r. pillai
'Date  :  20/06/2024
'Rights:  All Rights(c) Reserved by www.msaccesstips.com
'----------------------------------------------------------

Public Property Get O_Form() As Form
   Set O_Form = oFrm
End Property
 
Public Property Set O_Form(ByRef objForm As Form)
   Set oFrm = objForm
   
   Class_Init
End Property

Private Sub Class_Init()
On Error GoTo Class_Init_Err
Dim ctl As Control
Const EP = "[Event Procedure]"
   
For Each ctl In oFrm.Controls
    Select Case TypeName(ctl)
        Case "ListBox"
            Set Lst = New Wiz_ListBox
            Set Lst.Obj_Form = oFrm
            Set Lst.Lst_Box = ctl
                Lst.Lst_Box.OnClick = EP
                
                Coll.Add Lst
            Set Lst = Nothing
            
        Case "CommandButton"
            Set cmd = New Wiz_CmdButton
            Set cmd.Obj_Form = oFrm
            Set cmd.Obj_cmdButton = ctl
                cmd.Obj_cmdButton.OnClick = EP
                
                Coll.Add cmd
            Set cmd = Nothing
            
    End Select
Next

Class_Init_Exit:
Exit Sub

Class_Init_Err:
MsgBox Err & ": " & Err.Description, , "Class_Init()"
Resume Class_Init_Exit
End Sub

Private Sub Class_Terminate()
    While Coll.Count > 0
        Coll.Remove 1
    Wend
    Set Coll = Nothing
    Set Lst = Nothing
    
End Sub

The Class_Init() Subroutine enables the Click Events of the ListBox and Command Button Controls. 

The ListBox Wrapper Class 'Wiz_ListBox' Module VBA Code.

Option Compare Database
Option Explicit
 
Private WithEvents LstBox As Access.ListBox
Private Frm As Access.Form
'----------------------------------------------------------
'Streamlining Form Module Code in Stand-alone Class Modules
'With Reusable Structured Event Subroutine Coding.
'----------------------------------------------------------
'Event Procedure Coding in Standalone Class Module is now
'made easier with Readymade Object Wrapper Class Templates
'Demo Event Subroutine is created with the Control Names.
'----------------------------------------------------------
'Program: Wrapper Class Template Wizard
'Author:  a.p.r. pillai
'Date  :  20/06/2024
'Rights:  All Rights(c) Reserved by www.msaccesstips.com
'----------------------------------------------------------

Public Property Get Obj_Form() As Form
   Set Obj_Form = Frm
End Property
 
Public Property Set Obj_Form(ByRef objForm As Form)
   Set Frm = objForm
End Property
 
Public Property Get Lst_Box() As Access.ListBox
   Set Lst_Box = LstBox
End Property
 
Public Property Set Lst_Box(ByRef objListB As Access.ListBox)
   Set LstBox = objListB
End Property

Private Sub LstBox_Click()
On Error GoTo LstBox_Click_Err
  Select Case LstBox.Name
    Case "List1"
        Dim lCount As Integer
        Dim tmpList As ListBox
        Dim j As Integer

        Set tmpList = Frm.List1
        lCount = tmpList.ListCount - 1

        For j = 0 To lCount
            If tmpList.Selected(j) Then
                Frm.cmdRun.Enabled = True
                Exit Sub
            Else
                Frm.cmdRun.Enabled = False
            End If
        Next

  End Select
  
LstBox_Click_Exit:
Exit Sub

LstBox_Click_Err:
MsgBox Err & ": " & Err.Description, , "LstBox_Click()"
Resume LstBox_Click_Exit
End Sub

The Click Event of the ListBox Control checks for the presence of any selected Items in the ListBox. If found, enables the Command Button with the Caption 'Run Wizard'; otherwise, the Command Button is disabled.

The Command Button Wrapper Class 'Wiz_CmdButton' Module Code.

Option Compare Database
Option Explicit
 
Private WithEvents cmdButton As Access.CommandButton
Private Frm As Access.Form
'----------------------------------------------------------
'Streamlining Form Module Code in Stand-alone Class Modules
'With Reusable Structured Event Subroutine Coding.
'----------------------------------------------------------
'Event Procedure Coding in Standalone Class Module is now
'made easier with Readymade Object Wrapper Class Templates
'Demo Event Subroutine is created with the Control Names.
'----------------------------------------------------------
'Program: Wrapper Class Template Wizard
'Author:  a.p.r. pillai
'Date  :  20/06/2024
'Rights:  All Rights(c) Reserved by www.msaccesstips.com
'----------------------------------------------------------

Public Property Get Obj_Form() As Access.Form
   Set Obj_Form = Frm
End Property
 
Public Property Set Obj_Form(ByRef objForm As Access.Form)
   Set Frm = objForm
End Property
 
Public Property Get Obj_cmdButton() As Access.CommandButton
   Set Obj_cmdButton = cmdButton
End Property
 
Public Property Set Obj_cmdButton(ByRef vcmdButton As Access.CommandButton)
   Set cmdButton = vcmdButton
End Property
 
Private Sub cmdButton_Click()
On Error GoTo cmdButtonClick_Err
   Select Case cmdButton.Name
     Case "cmdClose"
        DoCmd.Close acForm, "ClassWizard"
        
        
     Case "cmdRun"
        Dim modul As Module
        Dim flag As Boolean
        Dim vbcompo As vbcomponent
        Dim tmpList As ListBox
        Dim wiz As Integer
        Dim strWiz As String

        Dim FunctionName As String
        Dim FieldListFile As String
        Dim ClsTemplate As String
        Dim s_ObjTypeName As String
        Dim s_ObjName As String
        
        Dim msg As String
        Dim lCount As Integer
        Dim j As Integer, k As Integer
        Dim qot As String
        Dim objType As Long
        Dim Dt As Double
        Dim ClsSourceFile As String
        Dim ProjectName As String
        Dim Result As Boolean
        
        qot = Chr(34)
        Set tmpList = Frm.List1
        lCount = tmpList.ListCount - 1
        k = 0

        'Validation Check
        msg = ""
        For j = 0 To lCount
          If tmpList.Selected(j) Then
                'FieldList File
                FieldListFile = CurrentProject.Path & "\" & tmpList.Column(1, j)
        
                'Chek for FieldList File on Disk
                    If Len(Dir(FieldListFile)) = 0 Then
                      Open FieldListFile For Output As #1
                        Print #1, Space(5)
                      Close #1
                    End If
        
                'Class Template Name
                ClsTemplate = tmpList.Column(2, j)
                
                msg = ""
                FunctionName = tmpList.Column(3, j)
                If Len(Nz(FunctionName, "")) = 0 Then
                    FunctionName = "CreateClassTemplate"
                End If
                
                s_ObjTypeName = tmpList.Column(4, j)
                If Len(Nz(s_ObjTypeName, "")) = 0 Then 'Control Type Name column empty
                    msg = "*** Object TypeName not specified!"
                Else
                    objType = ControlTypeCheck(s_ObjTypeName) 'Is it a Valid Control TypeName
                    If objType = 9999 Then 'Name not in specified list
                        msg = "*** object Typename: " & UCase(s_ObjTypeName) & vbCr _
                        & "Not in specified List?"
                    End If
                End If
    
                s_ObjName = tmpList.Column(5, j)
                If Len(Nz(s_ObjName, "")) = 0 Then 'Column is empty
                    msg = msg & vbCr & vbCr & "User-Defined Object Name Column is Empty!"
                End If
                If Len(msg) > 0 Then 'Errors Found
                    msg = msg & vbCr & vbCr & "Errors Found in Item: " & tmpList.Column(0, j) & _
                    vbCr & "Rectify the Errors and Re-run!"
                    MsgBox msg, vbCritical + vbOKCancel, "cmdButton_Click()"
                    Exit Sub
                Else 'No Errors then creaate Template
                'Call the Wizard
Result = CreateClassTemplate(FieldListFile, ClsTemplate, s_ObjTypeName, s_ObjName)
                    If Not Result Then
                        MsgBox "Errors Encountered for '" & ClsTemplate & "'" & vbCr _
                        & "Review/Modify the Parameter value(s) and Re-try."
                    End If
                End If
    End If

Next j
        MsgBox "Class Module Templates Created successfully!"

        'Save created Template Class modules
        DoCmd.RunCommand acCmdCompileAndSaveAllModules

     Case "cmdHelp"
        DoCmd.OpenForm "Wiz_Help", acNormal
        
   End Select

cmdButtonClick_Exit:
Exit Sub

cmdButtonClick_Err:
MsgBox Err & ": " & Err.Description, , "cmdButtonClick()"
Resume cmdButtonClick_Exit
End Sub

It runs a series of checks on the Wizard parameters and validates them before calling the CreateClassTemplate() Function with its parameters.

The Wizard will retrieve the Parameters for the selected items from the ListItems Table and check for the Field List/Control Files from the selected options on the disk. If found, then it retrieves the list of controls, if any, for the sample Event Subroutine.

After validation of parameter values, it calls the Wizard Function CreateClassTemplate(), which creates the Class Module Templates for the selected options, with predefined names in your Project's VBE Window's Navigation Pane.  

The CreateClassTemplate() Wizard Function VBA Code is given below:

Public Function CreateClassTemplate(ByVal FieldListFile As String, _
ByVal ClassTemplateName As String, ByVal strObjTypeName As String, _
ByVal strObjName As String) As Boolean

'----------------------------------------------------------
'Streamlining Form Module Code in Stand-alone Class Modules
'With Reusable Structured Event Subroutine Coding.
'----------------------------------------------------------
'Event Procedure Coding in Standalone Class Module is now
'made easier with Readymade Object Wrapper Class Templates
'Demo Event Subroutine is created with the Control Names.
'----------------------------------------------------------
'Program: Wrapper Class Template Wizard
'Author:  a.p.r. pillai
'Date  :  20/06/2024
'Rights:  All Rights(c) Reserved by www.msaccesstips.com
'----------------------------------------------------------

On Error GoTo CreateClassTemplate_Err
Dim j As Long, k As Long, h As Long, CountLines As Long
Dim low As Long, high As Long
Dim FieldList() As String
Dim strItem As Variant
Dim strLines(1 To 33) As String
Dim msg As String
Dim idx As Integer
Dim spacex As String
Dim qot As String
Dim ClsPath As String
Dim vbcompo As vbcomponent

spacex = Chr(32)
qot = Chr(34)
idx = 1

strLines(idx) = "VERSION 1.0 CLASS": GoSub NextIndex
strLines(idx) = "BEGIN": GoSub NextIndex
strLines(idx) = "  MultiUse = -1": GoSub NextIndex
strLines(idx) = "End": GoSub NextIndex
strLines(idx) = "Attribute VB_Name = " & qot & ClassTemplateName & qot: GoSub NextIndex
strLines(idx) = "Attribute VB_GlobalNameSpace = False": GoSub NextIndex
strLines(idx) = "Attribute VB_Creatable = False": GoSub NextIndex
strLines(idx) = "Attribute VB_PredeclaredId = False": GoSub NextIndex
strLines(idx) = "Attribute VB_Exposed = False": GoSub NextIndex
strLines(idx) = "Option Compare Database": GoSub NextIndex
strLines(idx) = "Option Explicit": GoSub NextIndex
strLines(idx) = spacex: GoSub NextIndex
strLines(idx) = "Private WithEvents " & strObjName & " as Access." & strObjTypeName: GoSub NextIndex
strLines(idx) = "Private Frm as Access.Form": GoSub NextIndex
strLines(idx) = spacex: GoSub NextIndex
strLines(idx) = "Public Property Get Obj_Form() as Access.Form": GoSub NextIndex
strLines(idx) = "   Set Obj_Form = Frm": GoSub NextIndex
strLines(idx) = "End Property": GoSub NextIndex
strLines(idx) = spacex: GoSub NextIndex
strLines(idx) = "Public Property Set Obj_Form(ByRef objForm as Access.Form)": GoSub NextIndex
strLines(idx) = "   Set Frm = objForm": GoSub NextIndex
strLines(idx) = "End Property": GoSub NextIndex
strLines(idx) = spacex: GoSub NextIndex
strLines(idx) = "Public Property Get Obj_" & strObjName & "() as Access." & strObjTypeName: GoSub NextIndex
strLines(idx) = "   Set obj_" & strObjName & " = " & strObjName: GoSub NextIndex
strLines(idx) = "End Property": GoSub NextIndex
strLines(idx) = spacex: GoSub NextIndex
strLines(idx) = "Public Property Set Obj_" & strObjName & "(ByRef v" & strObjName & " as Access." & strObjTypeName & ")": GoSub NextIndex
strLines(idx) = "   Set " & strObjName & " = v" & strObjName: GoSub NextIndex
strLines(idx) = "End Property": GoSub NextIndex
strLines(idx) = spacex: GoSub NextIndex
strLines(idx) = "Private Sub " & strObjName & "_Click()": GoSub NextIndex
strLines(idx) = "   Select Case " & strObjName & ".Name"

'Read the Field Names into Array
Open FieldListFile For Input As #1
strItem = ""
j = 0
While Not EOF(1)
    Input #1, strItem
 If Len(Trim(Nz(strItem, " "))) > 0 Then
    j = j + 1
    ReDim Preserve FieldList(1 To j) As String
    FieldList(j) = strItem
 End If
Wend
Close #1

If j > 0 Then 'If 0 then Field List File is empty
    low = LBound(FieldList)
    high = UBound(FieldList)
End If

'Write the Array contents to file
ClsPath = CurrentProject.Path & "\TempClass.cls"
Open ClsPath For Output As #1
For k = 1 To idx
    Print #1, strLines(k)
Next

'Subroutine Lines
If j > 0 Then 'if 0 then Field List file is empty
    For h = low To high
        Print #1, "     Case " & qot & FieldList(h) & qot
        Print #1, "        ' Code"
        Print #1, spacex
    Next
End If
    Print #1, spacex
    Print #1, "   End Select"
    Print #1, "End Sub"
    Print #1, spacex
Close #1

    ' Import the class module
Set vbcompo = Application.VBE.ActiveVBProject.VBComponents.Import(ClsPath)
    
    ' Verify if the imported module is a class module
    'Compile and Save module
    If vbcompo.Type = vbext_ct_ClassModule Then
        CreateClassTemplate = True
        Kill ClsPath
    Else
        CreateClassTemplate = False
        MsgBox "Import failed: Not a class module."
    End If

CreateClassTemplate_Exit:
Exit Function

NextIndex:
idx = idx + 1
Return

CreateClassTemplate_Err:
MsgBox Err & ": " & Err.Description, , "CreateClassTemplate()"
Resume CreateClassTemplate_Exit
End Function

Check the VBE navigation pane for the newly created Template Files. They may not appear immediately in the Database navigation pane.

The Wizard's VBA Code is straightforward. The first 33 lines of Code are standard, with the change of  Object Names and Type declarations inserted at appropriate positions using the Parameters obtained from the ListItems Table.

Next, it checks for the Field Names list file (or the Control Type-related Text File Names given in the ListItems Table) in the TextBoxFieldsList.txt. If Control Names are present in the Text File, they are loaded into an Array in memory.

After that, the first 33 VBA Code lines are written into the TempClass.cls Text File. If the Field List/Control Name lines are found in the Array, it creates a sample Click Event Subroutine Code within the Select Case . . . Case . . . End Select structure for ready-to-write Event Procedure Code wherever applicable.

This sample Event Subroutine structure can be copied for other Event Procedures, like BeforeUpdate(), GotFocus(), and others.

Finally, the TempClass.cls Text File is Imported into the VBE Project's Code Pane. Look for the Class Modules with the _Template Suffix to spot them quickly.

If the Import action is unsuccessful, then display an Error Message. In that case, you should investigate and find the cause of the Error, correct it, and try again. 

You may highlight one or more required Object Template Options from the ListBox, and the Wizard creates them quickly. You can rename the Template Modules or copy the generated Code from the Template Module and paste it into a separate Class module for normal use. Modify the Object Names- part and use it with other types of control.

Click the Help Command Button to display the Help Form in your Application Window. The Help Form Image is shown below.

The listItems Record ID Enumerations are given below.

Enum ParamID
    wizTextBox = 1
    wizCommandButton = 2
    wizComboBox = 3
    wizListBox = 4
    wizLabel = 5
    wizOptionGroup = 6
    wizOptionButton = 7
    wizCheckBox = 8
    wizToggleButton = 9
    wizTabControl = 10
End Enum

The Control Type Validating Function Code Listing.

Public Function ControlTypeCheck(ByVal strctl As String) As Long
On Error GoTo ControlTypeCheck_Err
Dim ctrlType(1 To 10) As String
Dim ctrl(1 To 10) As Long
Dim j As Integer

For j = 1 To 10
 Select Case j
    Case 1: ctrlType(j) = "Label": ctrl(j) = acLabel '100
    Case 2: ctrlType(j) = "CommandButton": ctrl(j) = acCommandButton '104
    Case 3: ctrlType(j) = "OptionButton": ctrl(j) = acOptionButton '105
    Case 4: ctrlType(j) = "CheckBox": ctrl(j) = acCheckBox '106 
    Case 5: ctrlType(j) = "OptionGroup": ctrl(j) = acOptionGroup '107 
    Case 6: ctrlType(j) = "TextBox": ctrl(j) = acTextBox '109
    Case 7: ctrlType(j) = "ListBox": ctrl(j) = acListBox '110
    Case 8: ctrlType(j) = "ComboBox": ctrl(j) = acComboBox '111
    Case 9: ctrlType(j) = "ToggleButton": ctrl(j) = acToggleButton '122 
    Case 10: ctrlType(j) = "TabControl": ctrl(j) = acTabCtl '123  
End Select
Next

For j = LBound(ctrlType) To UBound(ctrlType)
    If ctrlType(j) = strctl Then
        ControlTypeCheck = ctrl(j): Exit For
    Else
       ControlTypeCheck = 9999 'Error
    End If
Next

ControlTypeCheck_Exit:
Exit Function

ControlTypeCheck_Err:
MsgBox Err & ": " & Err.Description, , "ControlTypeCheck()"
Resume ControlTypeCheck_Exit
End Function

I hope you are enjoying the new approach to coding with reusable VBA code and easier code maintenance, without the need to constantly interfere with the Form Design View. The 'Streamlining Form Module Code in the Standalone Cass Module' also enhances code portability to other projects, offering a significant advantage.

Demo Databases Download.


  1. Reusing Form Module VBA Code for New Projects.
  2. Streamlining Form Module Code - Part Two.
  3. Streamlining Form Module Code - Part Three
  4. Streamlining Form Module Code - Part Four
  5. Streamlining Form Module Code - Part Five
  6. Streamlining Form Module Code - Part Six
  7. Streamlining Form Module Code - Part Seven
  8. Streamlining Form Module Code - Part Eight
  9. Streamlining Form Module Code - Part Nine
  10. Streamlining Form Module Code - Part Ten
  11. Streamlining Form Module Code - Part Eleven
  12. Streamlining Report Module Code in Class Module
  13. Streamlining Module Code Report Line Hiding-13.
  14. Streamlining Form Module Code Part-14.
  15. Streamlining Custom Made Form Wizard-15.
  16. Streamlining VBA Custom Made Report Wizard-16.
  17. Streamlining VBA External Files List in Hyperlinks-17
  18. Streamlining Events VBA 3D Text Wizard-18
  19. Streamlining Events VBA RGB Color Wizard-19
  20. Streamlining Events Numbers to Words-20
  21. Access Users Group(Europe) Presentation-21
  22. The Event Firing Mechanism of MS Access-22
  23. One TextBox and Three Wrapper Class Instances-23
  24. Streamlining Code Synchronized Floating Popup Form-24
  25. Streamlining Code Compacting/Repair Database-25
  26. Streamlining Code Remainder Popup Form-26
  27. Streamlining Code Editing Data in Zoom-in Control-27
  28. Streamlining Code Filter By Character and Sort-28
  29. Table Query Records in Collection Object-29
  30. Class for All Data Entry Editing Forms-30
  31. Wrapper Class Module Creation Wizard-31
  32. wrapper-class-template-wizard-v2
Share:

Wrapper Class Module Creation Wizard

Streamlining Form Module Code in Standalone Class Module.

Wrapper Class Module Wizard.

We organize the controls on a form into groups based on their type—such as TextBox/Field, CommandButton, or ComboBox—and create separate wrapper class modules for each group to manage their event subroutine code. Each class module follows a consistent structure, starting with declarations for the form and control objects in the global area, followed by the corresponding property procedures.

The event subroutines come next and require the correct TextBox/Field names from the form to write the code under each Case statement within a subroutine. Accurately memorizing control names can be difficult, which often forces developers to repeatedly consult the property sheet of the controls. This results in constant switching between the class module and the form’s design view, making the process tedious and time-consuming.

The ClassWizard Form Image.  

When the database form is opened, we typically scan it for different types of controls as part of the new Streamlined Event Subroutine Coding procedure. The control names can then be saved into text files on disk, organized by control type—for example, TextBox names in one file, CommandButton names in another, and ComboBox names in a separate file. This approach makes it easier to reference control names and minimizes the need to constantly switch between the class module and the form’s design view.

So, we now have the following necessary elements for building the ClassWrapper Class Templates with Code:

  1. Global Declaration of Objects.
  2. The Standard Property Procedures for the declared Objects.

  3. The Control Names are collected from the Form and written into a Text File on Disk.  We can build a single Subroutine structure, with all the Field Names placed within the Select Case Statements.

Once the Wrapper Class Module Template (ClassTextBox_Template) is generated with a sample BeforeUpdate() event subroutine using the Class Wizard, you can reuse its structure for other events, such as GotFocus() or LostFocus(), by simply copying, pasting, and updating the event names. From there, you can add the specific code required for each event. Any unnecessary field names can be removed from the Case statements to keep the code clean and focused.

The Wizard’s input file, TextBoxFields.txt, stores the field names from the Employees table. These names are captured when the Employee Form is open and the Class_Init() subroutine runs in the Class_ObjInit Class Module. An example of this input file for the Class Wizard Program is shown below.

TextBoxFields.txt File contents.

ID
Company
Last Name
First Name
E-mail Address
Job Title
Address
City
State/Province
ZIP/Postal Code
Country/Region

The above Field List File is created from the Employees Form's Class_Init() Subroutine in the Class_ObjInit Intermediary Class Module.

The Employees Form Image is given below, with some not-in-use CommandButtons and ComboBoxes added for trial run purposes.

The new Class_Init() Subroutine of Employees Form, with the Text File creation Code, is listed below.

Private Sub Class_Init()
Dim ProjectPath As String
Dim txtPath As String
Dim cmdPath As String
Dim ComboPath As String
Dim ctl As Control

On Error GoTo ClassInit_Err

Const EP = "[Event Procedure]"

'Save TextBox, CommandButton & CombBox Names
'to the Text Files for creating Event Subroutine Template
ProjectPath = CurrentProject.Path & "\"

txtPath = ProjectPath & "TextBoxFields.txt"
cmdPath = ProjectPath & "CmdButtonsList.txt"
ComboPath = ProjectPath & "ComboBoxList.txt"

If Len(Dir(txtPath)) > 0 Then 'delete earlier file
  Kill txtPath
End If

If Len(Dir(cmdPath)) > 0 Then 'delete earlier file
  Kill cmdPath
End If

If Len(Dir(ComboPath)) > 0 Then 'delete earlier file
  Kill ComboPath
End If

Open txtPath For Output As #1 'TextBoxFields.txt for writing
Open cmdPath For Output As #2 'CmdButtonsList.txt
Open ComboPath For Output As #3 'ComboBoxList.txt

'Instantiate the 'Data_txtBox' Class for each TextBox
'on the Form for streamlined Event Procedures Coding
For Each ctl In Frm.Controls
    Select Case TypeName(ctl)
        Case "TextBox"
            Set txt = New Data_TxtBox
            Set txt.m_Frm = Frm
            Set txt.m_txt = ctl
    Print #1, ctl.Name 'write Field/TextBox Name in TextBoxFields.txt File
            
'//Colin Riddington Technique: Highlighting BackColor on GotFocus
                txt.m_txt.BackColor = 62207 'yellow
                txt.m_txt.BackStyle = 0
    
                txt.m_txt.BeforeUpdate = EP
                txt.m_txt.OnDirty = EP
                
                Coll.Add txt 'Add Data_TxtBox Class Instance to Collection
                Set txt = Nothing 'Reset txt object
      
      Case "CommandButton"
            Set cmd = New Data_CmdButton
            Set cmd.Obj_Form = Frm
            Set cmd.cmd_Button = ctl
    Print #2, ctl.Name 'write CmdButton Name in CmdButtonsList.txt File
                
                cmd.cmd_Button.OnClick = EP
                
                Coll.Add cmd
                Set cmd = Nothing
                
      Case "ComboBox"
            Set Cbo = New Data_CboBox
            Set Cbo.m_Frm = Frm
            Set Cbo.m_Cbo = ctl
    Print #3, ctl.Name 'write ComboBox Names in ComboBoxList.txt File
    
'//Colin Riddington Technique: Highlighting BackColor on GotFocus
                Cbo.m_Cbo.BackColor = 62207
                Cbo.m_Cbo.BackStyle = 0
                
                Cbo.m_Cbo.BeforeUpdate = EP
                Cbo.m_Cbo.OnDirty = EP
                
                Coll.Add Cbo
                Set Cbo = Nothing
    End Select
Next
'Close all the three files
Close #1
Close #2
Close #3

ClassInit_Exit:
Exit Sub

ClassInit_Err:
MsgBox Err & ": " & Err.Description, , "Class_Init()"
Resume ClassInit_Exit
End Sub

The BASIC Language Text File Creation, Writing/Reading Statements:

Public Sub sub writeText()
Dim strItem As String
strItem = "www.msaccesstips.com"

Open "C:\myTextFile.txt" For Output As #1 'Open file in Output/writing Mode
   Print #1, strItem
Close #1

End Sub

Read the Text Data into a Variable

Public Sub ReadText()
dim strItem as String

Open "C:\myTextFile.txt" For Input As #1 'Open File in Input/Reading Mode
   Input #1, strItem
   debug.print strItem
Close #1

End Sub

The 'As #1' part indicates that this file is the first file in the Open state. If another file is to be opened for Writing/Reading simultaneously, then that will be 'As #2'.

The sample 'ClassTextBox_Template' VBA Code generated by the ClassTemplateWizard is listed below for reference.

The ClassTextBox_Template.

Option Compare Database
Option Explicit
 
Private WithEvents TextB As Access.TextBox
Private Frm As Access.Form
 
Public Property Get Obj_Form() As Form
   Set Obj_Form = Frm
End Property
 
Public Property Set Obj_Form(ByRef objForm As Form)
   Set Frm = objForm
End Property
 
Public Property Get Text_Box() As TextBox
   Set Text_Box = TextB
End Property
 
Public Property Set Text_Box(ByRef objTextB As TextBox)
   Set TextB = objTextB
End Property
 
Private Sub TextB_BeforeUpdate(Cancel As Integer)
   Select Case TextB.Name
     Case "ID"
        ' Code
 
     Case "Company"
        ' Code
 
     Case "Last Name"
        ' Code
 
     Case "First Name"
        ' Code
 
     Case "E-mail Address"
        ' Code
 
     Case "Job Title"
        ' Code
 
     Case "Address"
        ' Code
 
     Case "City"
        ' Code
 
     Case "State/Province"
        ' Code
 
     Case "ZIP/Postal Code"
        ' Code
 
     Case "Country/Region"
        ' Code
 
   End Select
End Sub

 

The ClassTemplateWizard.accdb contains the Class Wizard Form. An image of the Wizard Form is provided at the top of this page. To use it, you must first attach this database as a Library Database to your current project.

Once attached, you can run the Public Function OpenClassWizard() either by typing it directly in the Debug Window or by calling it from a Command Button’s Click Event Subroutine.

After attaching ClassTemplateWizard.accdb as a Library Database (via Tools → References...), ensure it is checked in the list of available library files.

Now, follow the steps below to create the Class Template file on disk:

Steps to Create the Class Template File

  1. Open a Form (e.g., the Employees Form) and close it after a few seconds.

    • The Class_Init() Subroutine creates three text files in your database folder:

      • TextBoxFields.txt – list of TextBox names

      • CmdButtonList.txt – list of CommandButton names

      • ComboBoxList.txt – list of ComboBox names

    • These files are automatically overwritten each time a new form is opened.

  2. Run the OpenClassWizard() Function from the Debug Window.

    • The Wizard Form opens behind the VBA window. Minimize the VBA window to see it.

  3. Select TextBoxFields.txt from the left-hand ListBox in the Wizard input Form.

  4. Select ClassTextBox_Template.cls from the right-hand ListBox.

  5. Click the Run Wizard button.

  6. A confirmation message will appear, informing you that ClassTextBox_Template.cls has been created in your project’s folder.

  7. In the VBA editor, right-click the Navigation Pane (near your project’s Class Modules list, not the attached Wizard database’s list) and choose Import File....

  8. Browse to your project folder, select ClassTextBox_Template.cls, and click Open.

The ClassTextBox_Template Class is created among the Class Modules List in the VBA Navigation Pane. 

Even though the ClassTextBox_Template.cls file is generated for a specific form, it can also be reused in other forms or imported into a new project. To adapt it for a different form, simply update the TextBox names accordingly.

The Wizard functions are available in the Standard Module of the ClassTemplateWizard.accdb database. For testing purposes, you can use the sample database ClassLibrary_Main.accdb.

Demo Databases Download.


  1. Reusing Form Module VBA Code for New Projects.
  2. Streamlining Form Module Code - Part Two.
  3. Streamlining Form Module Code - Part Three
  4. Streamlining Form Module Code - Part Four
  5. Streamlining Form Module Code - Part Five
  6. Streamlining Form Module Code - Part Six
  7. Streamlining Form Module Code - Part Seven
  8. Streamlining Form Module Code - Part Eight
  9. Streamlining Form Module Code - Part Nine
  10. Streamlining Form Module Code - Part Ten
  11. Streamlining Form Module Code - Part Eleven
  12. Streamlining Report Module Code in Class Module
  13. Streamlining Module Code Report Line Hiding-13.
  14. Streamlining Form Module Code Part-14.
  15. Streamlining Custom Made Form Wizard-15.
  16. Streamlining VBA Custom Made Report Wizard-16.
  17. Streamlining VBA External Files List in Hyperlinks-17
  18. Streamlining Events VBA 3D Text Wizard-18
  19. Streamlining Events VBA RGB Color Wizard-19
  20. Streamlining Events Numbers to Words-20
  21. Access Users Group(Europe) Presentation-21
  22. The Event Firing Mechanism of MS Access-22
  23. One TextBox and Three Wrapper Class Instances-23
  24. Streamlining Code Synchronized Floating Popup Form-24
  25. Streamlining Code Compacting/Repair Database-25
  26. Streamlining Code Remainder Popup Form-26
  27. Streamlining Code Editing Data in Zoom-in Control-27
  28. Streamlining Code Filter By Character and Sort-28
  29. Table Query Records in Collection Object-29
  30. Class for All Data Entry Editing Forms-30
  31. Wrapper Class Module Creation Wizard-31
  32. wrapper-class-template-wizard-v2


Share:

PRESENTATION: ACCESS USER GROUPS (EUROPE)

Translate

PageRank

Post Feed


Search

Popular Posts

Blog Archive

Powered by Blogger.

Labels

Forms Functions How Tos MS-Access Security Reports msaccess forms Animations msaccess animation Utilities msaccess controls Access and Internet MS-Access Scurity MS-Access and Internet Class Module External Links Queries Array msaccess reports Accesstips WithEvents msaccess tips Downloads Objects Menus and Toolbars Collection Object MsaccessLinks Process Controls Art Work Property msaccess How Tos Combo Boxes Dictionary Object ListView Control Query VBA msaccessQuery Calculation Event Graph Charts ImageList Control List Boxes TreeView Control Command Buttons Controls Data Emails and Alerts Form Custom Functions Custom Wizards DOS Commands Data Type Key Object Reference ms-access functions msaccess functions msaccess graphs msaccess reporttricks Command Button Report msaccess menus msaccessprocess security advanced Access Security Add Auto-Number Field Type Form Instances ImageList Item Macros Menus Nodes RaiseEvent Recordset Top Values Variables Wrapper Classes msaccess email progressmeter Access2007 Copy Excel Export Expression Fields Join Methods Microsoft Numbering System Records Security Split SubForm Table Tables Time Difference Utility WScript Workgroup database function msaccess wizards tutorial Access Emails and Alerts Access Fields Access How Tos Access Mail Merge Access2003 Accounting Year Action Animation Attachment Binary Numbers Bookmarks Budgeting ChDir Color Palette Common Controls Conditional Formatting Data Filtering Database Records Defining Pages Desktop Shortcuts Diagram Disk Dynamic Lookup Error Handler External Filter Formatting Groups Hexadecimal Numbers Import Labels List Logo Macro Mail Merge Main Form Memo Message Box Monitoring Octal Numbers Operating System Paste Primary-Key Product Rank Reading Remove Rich Text Sequence SetFocus Summary Tab-Page Union Query User Users Water-Mark Word automatically commands hyperlinks iSeries Date iif ms-access msaccess msaccess alerts pdf files reference restore switch text toolbar updating upload vba code