Access Europe - Using VBA to create a class based on a table - Wed 1 May (1 Viewer)

isladogs

MVP / VIP
Local time
Today, 05:53
Joined
Jan 14, 2017
Messages
18,295
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).

In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.

He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will then demonstrate VBA code to create class modules from tables and use the class created to populate/navigate/update a simple unbound form.
An example database will be provided containing all the code used for this presentation.

I hope you will join us on May 1st for this session.

CoverSlideMay24.png


For more details about the topic and speaker together with connection details for the meeting, please visit https://isladogs.co.uk/aeu-27/ or https://accessusergroups.org/europe/event/access-europe-2024-05-01/

For local start times, please check https://www.worldtimebuddy.com

The meeting will again be held on Zoom. When the time comes, you can connect using Join Zoom Meeting.
If you are asked, use: Meeting ID: 924 3129 5683 ; Passcode: 661210
 
Last edited:

isladogs

MVP / VIP
Local time
Today, 05:53
Joined
Jan 14, 2017
Messages
18,295
REMINDER
Access Europe meeting is today at 18:00 (6 PM) UK time. Hope you can join us.
For full details and connection info, see post #1
 

isladogs

MVP / VIP
Local time
Today, 05:53
Joined
Jan 14, 2017
Messages
18,295
The video of Adolph's presentation to Access Europe on Wed 1 May is now available on YouTube. Hope others find it useful


A significant part of the session explained how and why class modules can be very useful and showed how class module code can be generated automatically using VBA i.e. code to create code!
A PDF of the presentation together with the example database used in the session is available from https://www.isladogs.co.uk/aeu-27
 

Gasman

Enthusiastic Amateur
Local time
Today, 05:53
Joined
Sep 21, 2011
Messages
14,607
I enjoyed that via YouTube. Especially the code to create the class.
My only concern was that I use captions for my labels, but changing them on the form does not affect its functionality.

I wonder if @MajP would find that extremely useful?

I would ask whyd do class variables always begin with m ?
Is that just a standard naming convention, that appears to always be adhered to?
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 00:53
Joined
May 21, 2018
Messages
8,685
I would ask why do class variables always begin with m ?
The convention is short for class "member", but your question is probably why have any prefix.
The reason is because often these are exposed with a Set/Let and Get accessor methods. The Set/Let/Get accessor methods of the property are always descriptive.

if the property is "Color" then you could not have a class variable with the name "Color". Cannot have a variable and method with the same name. But you want to easily associate what variable is related to what let/get/set methods.
 
Last edited:

GPGeorge

George Hepworth
Local time
Yesterday, 21:53
Joined
Nov 25, 2004
Messages
2,088
The convention is short for class "member", but your question is probably why have any prefix.
The reason is because often these are exposed with a Set/Let and Get. The Set/Let/Get methods of the property are always descriptive.

if the property is "Color" then you could not have a class variable with the name "Color". Cannot have a variable and method with the same name. But you want to easily associate what variable is related to what let/get/set methods.
Good on Gasman for asking. Sometimes we can be reluctant to ask the questions that we think "everyone should know".
 

Gasman

Enthusiastic Amateur
Local time
Today, 05:53
Joined
Sep 21, 2011
Messages
14,607
Good on Gasman for asking. Sometimes we can be reluctant to ask the questions that we think "everyone should know".
When I was a Lecturer with Honeywell Bull, I would say to the class "feel free to ask any questions, even if you think you should know the answer. I can guarantee you when you do, someone else will think 'I am glad they asked that' " :)

By the end of the course, I had questions coming fast and furious. :)
 
Last edited:

Users who are viewing this thread

Top Bottom