Тёмный

How to Use Global Variables in Microsoft Access VBA 

Sean MacKenzie Data Engineering
Подписаться 13 тыс.
Просмотров 8 тыс.
50% 1

In this episode, we're going to take a look at how to use a global variable in Microsoft Access so that we can populate a variable in our program and have it available for consumption by our forms, reports, macros, and other code in our project. Global variables are quite handy when you need to store different things in memory as your program runs, whether it is a string, array, object, or other things.
Related Videos:
How to Use Left, Right, Mid, Instr, and Trim on Strings in MS Access and VBA
• How to Use Left, Right...
How to Use DateAdd, DateDiff, and DatePart to Calculate Dates in MS Access
• How to Use DateAdd, Da...
How to Handle Line Breaks in Microsoft Access
• How to Handle Line Bre...
How to Open a RecordSet in Access VBA and Loop Through the Records
• How to Open a RecordSe...
How to Use BOF and EOF on Recordsets in MS Access
• How to Use BOF and EOF...
How to use With.. End With in MS Access VBA
• How to use With.. End ...
How to Use Global Variables in Microsoft Access VBA
You are watching this video now!
How to Use For Next Loops in MS Access VBA
• How to Use For Next Lo...
How to Use a Do While Loop in MS Access VBA
• How to Use a Do While ...
Interested in transforming your career or finding your next gig?
system.billzon...
Want my team to do a project for you? Let's get to it!
system.billzon...
Want to get access to premium content made just for you and have a chat with me? Find me on Patreon :
/ mackenziedataengineering
Demo of my BZ RDP Cloaker:
www.patreon.co...
Want to work with me 1:1? Contact me today and book your free 20 min consultation!
Contact form you can find at www.mackenziema...
Follow me on social media:
/ mackenziedataanalytics
/ seamacke
/ seamacke
/ seamacke
/ psmackenzie
Get Microsoft Office including Access:
click.linksyne...
Got a RU-vid Channel? I use TubeBuddy, it is awesome. Give it a try:
www.tubebuddy....
#msaccess #vba #dataengineering

Опубликовано:

 

19 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 20   
@hikmatmarashdeh2293
@hikmatmarashdeh2293 2 года назад
thanks a lot for your explanation and demo, it helped me a lot.
@seanmackenziedataengineering
@seanmackenziedataengineering 2 года назад
Glad that helped! Cheers
@interestingamerican3100
@interestingamerican3100 2 года назад
Commenting for the algorithm. Love the content!
@seanmackenziedataengineering
@seanmackenziedataengineering 2 года назад
Thanks!
@RHSdbs
@RHSdbs Год назад
Very well explained, i already know this stuff, i also use the TempVars collection in MS-Access, if a global value/variable is needed.
@seanmackenziedataengineering
Thanks for sharing! TempVars are very handy indeed!
@abdoulayetoure9965
@abdoulayetoure9965 6 месяцев назад
Thank a lot for this vidéo it help me a lot
@seanmackenziedataengineering
@seanmackenziedataengineering 6 месяцев назад
Glad to hear that!
@RamachandranS20
@RamachandranS20 2 года назад
Thank you - helped me!
@seanmackenziedataengineering
@seanmackenziedataengineering 2 года назад
Glad it helped!
@stanTrX
@stanTrX 10 месяцев назад
Thanks Sean. How can i call a module anywhere in the forms? Is there a way to call it using a shortcut (just like we can do in excel )
@seanmackenziedataengineering
@seanmackenziedataengineering 10 месяцев назад
Great question and a key aspect of using Module objects vs Form code. The Global variables, Subs, and Functions in a Module can be used all throughout your program in Forms, Queries, and Reports simply by calling them by name. For example, if you had MyCodeToRun as a Sub in your module, you can run it by just using Form code: Form > Button > right-click Properties > Events > On Click > Elipsis ... > Code Builder > Editor opens with a new subroutine, Sub ... End Sub. You can simply type in MyCodeToRun between those lines and your module Sub will run. If you have ten other forms with similar functionality, you can do the same, meaning you can use one function 10 times instead of copying and pasting tons of code. So, short answer is: Form code, Report code, and Query expressions.
@stanTrX
@stanTrX 10 месяцев назад
thanks ☺@@seanmackenziedataengineering
@gerfer6261
@gerfer6261 2 года назад
Thanks 😊 ? = is there a connector you know about in Power Automate use between Access and Excel please?
@seanmackenziedataengineering
@seanmackenziedataengineering 2 года назад
I believe you can use the Open SQL (for Access) and Excel connectors for that purpose.
@satyabanukil779
@satyabanukil779 Год назад
Sir, I have a calculative field. I want to create two variables a and b. I want to add both the variables to that calculating field. For example a is 5 and b is 2 and my result shall appear as (a + b) = 7. If it is possible, kindly make a tutorial on it. Regards
@seanmackenziedataengineering
I don't think I ever made a program to show math results! Great idea for a video 👍
@satyabanukil779
@satyabanukil779 Год назад
@@seanmackenziedataengineering Sir all of your replies I received so far are not only of great help for learners like us but also prompt and very easy to follow. Looking forward for your tutorial as you mentioned here Sir. Regards.
@artistryartistry7239
@artistryartistry7239 2 года назад
You know your stuff, but you're not a good teacher. I'm not trying to be mean, I'm just giving honest feedback. There has to be real thinking and effort to make something clear and easy to understand, to put yourself in the mind of a person who may have no previous understanding of what you're doing. You have not applied that level of sophistication and polish to this work. As Steve Jobs said: "Simple can be harder than complex: You have to work hard to get your thinking clean to make it simple." You haven't done that here.
@seanmackenziedataengineering
@seanmackenziedataengineering 2 года назад
All feedback is welcome. My teaching methods are not for everyone. Imagine that you're an analyst approaching a senior analyst's desk and asking about a topic. He pulls together some examples for you that he knows are good, then explains them to you. He shows the main concept only, without an encyclopedic explanation of every feature on that topic. Why? Because he knows that you're a smart analyst and, after understanding the main breakthrough will proceed to research additional ways that a technology can be used. If you have questions, you'll ask. That's what you'll find on my channel. Polished, no. Effective, yes.
Далее
How to use With.. End With in MS Access VBA
9:42
Просмотров 1,4 тыс.
⚡ #RodrygoGoes ✖️ #Mbappé ⚽ #UCL
00:11
Просмотров 741 тыс.
How to Use Class Modules in Microsoft Access
26:35
Просмотров 1,1 тыс.
Microsoft Access - Working With TempVars in VBA
22:12
Просмотров 1,4 тыс.
How to Use DLookup in Microsoft Access
15:48
Просмотров 20 тыс.