How to Use Class Modules in Microsoft Access

preview_player
Показать описание
In this episode, we're doing a simple walkthrough of how to use Class Modules in Microsoft Access. This powerful feature of Access is often overlooked by developers, and is indeed one of those tools that you don't really know you need until you use it a few times. MS Access with VBA is generally considered a procedural programmer's environment, but wait until you see some cool, powerful programming features related to Object-Oriented Programming. It might change how you code in VBA. Let's check it out!

Block spammers from harassing your Remote Desktop, filling your Windows security logs with failed RDP attempts, and burning up your bandwidth with my BZ RDP Cloaker:

Check out my easy time entry system for your business:

Join me on Patreon!

Check out some tech (and support my channel!):

Want the code from this video?

Interested in transforming your career or finding your next gig?

Want my team to do a project for you? Let's get to it!

Follow me on social media:

Get Microsoft Office including Access:

Got a YouTube Channel? I use TubeBuddy, it is awesome. Give it a try:

#msaccess #vba
Рекомендации по теме
Комментарии
Автор

Thanks so much for this video, we appreciate.

hassanrozh
Автор

Looks like crossing the border
Lot to me and seems valuable
Will Download and try to understand
Thanks💫

tuffley
Автор

Thanks for posting this very interesting and informative video.

It would be great to take the discussion to the next level by explaining interfaces and their implementation. For this example, I envision an interface for Candy objects, ICandy, and for CandyBox objects, ICandyBox.

Also, if we add a Capacity property to the CandyBox object, then the AddCandy() method could raise a custom event BoxFull to display a message that the current instance of CandyBox is now full. Subsequent calls to AddCandy() might perhaps quietly ignore inputs.

Database tables and Excel ranges are among several ways of persisting instances of a class between sessions. I used such a technique in a large Excel application that modeled industrial ergonomic risk factors.

Thank you kindly.

serdip
Автор

Interesting. I am still trying to get my head around exactly how I would use objects in my database (I am an old mainframe programmer, so have built a database without OO programming, LOTS of VBA code ). I have many tables, most with many fields. I'm trying to understand what the benefit is to me of using class objects.. IS there a performance difference ? IE do all the records get loaded into memory once and then replace IO with memory access until I update/commit an update ? It would seem that I am going to need as many objects as I have tables where each object matches a record in a table (each field in the record becomes a property of the object).

simondodge
Автор

To bad Access has no option to bind class collection to form, so when you add Candy you can view in subform, and when you click submit button to add candy box in a main table and all candy's in separate table. In that way user can decide to save or not changes like word document.

zoranstojanovski