Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Using Class Module to Create Design Objects
Mohammed Alateyah 
     
4 days ago
Hello,

Recently I learned how to use class modules to program a data base object like combo box to behave a certain way. I liked the idea to create objects that I actually use a lot or think I am going to use a lot and want to reduce the redundant code since there are many events involved for example in fitness series Mr. Richard showed us how to do search as u type combo box so I can create that one time and every time I use that in any other form it is only as easy as calling standard module or function. However if that is possible I want your inputs How can enhance this method? what are the pros and cons? and I want to see more projects on Microsoft access to learn from their ideas can u suggest some sources I can refer to?
Richard Rost  @Reply  
          
4 days ago
You're definitely on the right track with class modules. As I say in my videos, they're really cool for promoting code reuse and keeping those repetitive tasks cleaner, especially if you have logic or behaviors you want to apply to multiple controls across forms. I start covering this exact topic in Access Developer 50, so if you're interested in getting deeper into classes, that's a good lesson to check out.

The main pros of using class modules in Access are that they let you encapsulate functionality and reduce repetitive code. They can give your projects a cleaner, more modular approach, especially if you keep running into the same copy-and-paste code across different objects, like those combo box search events you mentioned.

The cons? Well, they do add some complexity. You have to manage object references carefully, and it's easy to overcomplicate things for small projects where a simple function or macro might do the same job. Also, class modules in Access are honestly not something most Access developers ever need, so make sure you're using them for the right reasons.

In my own experience, over 30 years of working with Access, I've never run into a situation where I absolutely had to use a class module, but they are definitely helpful for advanced users who love organizing and reusing code.

If you've got any ideas for class module stuff, let me know. Maybe I'll add them to an upcoming developer lesson.
Richard Rost  @Reply  
          
4 days ago
Add a Reply Upload an Image
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/29/2026 11:24:55 PM. PLT: 1s