How to Use Global Variables in Microsoft Access VBA

แชร์
ฝัง
  • เผยแพร่เมื่อ 9 ม.ค. 2025

ความคิดเห็น • 20

  • @hikmatmarashdeh2293
    @hikmatmarashdeh2293 2 ปีที่แล้ว +1

    thanks a lot for your explanation and demo, it helped me a lot.

  • @RHSdbs
    @RHSdbs ปีที่แล้ว +1

    Very well explained, i already know this stuff, i also use the TempVars collection in MS-Access, if a global value/variable is needed.

  • @interestingamerican3100
    @interestingamerican3100 2 ปีที่แล้ว +1

    Commenting for the algorithm. Love the content!

  • @abdoulayetoure9965
    @abdoulayetoure9965 10 หลายเดือนก่อน +1

    Thank a lot for this vidéo it help me a lot

  • @RamachandranS20
    @RamachandranS20 2 ปีที่แล้ว +1

    Thank you - helped me!

  • @gerfer6261
    @gerfer6261 2 ปีที่แล้ว +1

    Thanks 😊
    ? = is there a connector you know about in Power Automate use between Access and Excel please?

    • @seanmackenziedataengineering
      @seanmackenziedataengineering  2 ปีที่แล้ว +1

      I believe you can use the Open SQL (for Access) and Excel connectors for that purpose.

  • @stanTrX
    @stanTrX ปีที่แล้ว +1

    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  ปีที่แล้ว +1

      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 ปีที่แล้ว

      thanks ☺@@seanmackenziedataengineering

  • @satyabanukil779
    @satyabanukil779 ปีที่แล้ว +1

    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
      @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 ปีที่แล้ว +1

    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 ปีที่แล้ว +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.