Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to ReCalc & OnActivate    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
And for the Next Step...
Gary James 
      
5 months ago
The topic covered in Rick’s Tech Help video explains how to refresh displayed data tables when changes are made in one form and then you switch to another. What I’m discussing here is a method for ensuring that changes made in one form are automatically updated and reflected in every other open form currently displaying the same data—without needing to switch to those forms. Note: this is likely a Developer- or Advanced-level topic.

So how is this possible?

The answer lies in Access’s built-in event messaging system. When a form modifies data in a table, it can instruct all other open forms to refresh their displays—provided they’re using the same table data.

VBA enables this through the creation of a singleton global object of a class that supports user-defined events. Any other class instance—such as the code module of a form—can assign a local reference to this global object and receive any events it broadcasts.

The global singleton object also exposes public subroutines that accept user-defined parameters, which are then sent to all event listeners. When a form updates a table, it should call the global object’s subroutine to broadcast an update signal to all hooked listeners. The form that initiated the update should also handle the event itself to refresh its own display. This way, any form can trigger an event that notifies both itself and all other listeners to update their displays accordingly.

Example Project

A demonstration of this technique is provided in a simple Access project. It displays a form with a textbox and prompts the user to create additional similar forms. This example shows that it doesn’t matter how many listeners are hooked into the global object’s event messages—they will all receive the same events.
Once multiple forms are displayed, typing into the textbox of any form immediately updates the textbox content in all other forms. This confirms that all forms are both sending and receiving events.

You can download the example project from GitHub at the following location: https://github.com/NfaToys/Global-Messaging-Events-Class/tree/main
Gary James OP  @Reply  
      
5 months ago

Richard Rost  @Reply  
          
5 months ago
Yeah, I did something like this a few years back for a client database. I might cover it in a Developer lesson. Thanks for sharing.
Gary James OP  @Reply  
      
5 months ago
Richard I’ve used this in past projects to have a status bar on my main form that displays help text whenever a critical control on any other visible form receives focus.   Once I discovered this “feature” of VBA, its potential uses blossomed.
Donald Blackwell  @Reply  
       
5 months ago
I think it's posted before,  I've merged Richard's Status Box with his his Form Shadow for debugging and help. I've been looking forward to Richard's class videos on the subject to integrate that for better functionality and performance.

I've seen tutorials for doing it but the instructor that I saw puts me to sleep, lol so haven't been able to get through it.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in ReCalc & OnActivate.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 4/30/2026 1:07:15 PM. PLT: 1s