Introduction to Programming in Visual Basic for Applications (VBA) in Microsoft Access (Access VBA)

Поделиться
HTML-код
  • Опубликовано: 28 сен 2024
  • In this video, I'm going to teach you how to start programming in Microsoft Access VBA. If you've never done any programming before, don't worry. I'll show you how to get started and walk you through it step by step. We will learn how to work with the VBA Editor, create a MsgBox, learn how to open a form with DoCmd.OpenForm, and set a value in a form field.
    Patricia from Ann Arbor, Michigan (a Platinum Member) asks: I've seen in several of your TechHelp videos where you mention "you can do this with a couple lines of code." I've been using Access for a few years, but I've never done any VBA programming before. Can you tell me where do I put this code, and how do I get started?
    Silver Members and up get access to an Extended Cut of this video. Members will learn how to create a button to open a form to a specific record. We'll put a customer list box on the main menu. Pick a customer, click the button, and that customer's record will open. Then we'll learn about Event programming. We'll use the On Double Click event to do the same thing by just double-clicking on that customer list box. Then we'll learn about the If / Then / Else statement. If the user doesn't pick a customer from the list and then click the open button, then they will get an error message. Lots more too!
    MEMBERS VIDEO:
    • Intro to VBA. MEMBERS ...
    BECOME A MEMBER:
    RUclips: / @599cd
    or My Site: 599cd.com/THMe...
    LEARN MORE:
    599cd.com/Intr...
    LINKS:
    Free Intro VBA Template Download: 599cd.com/Intr...
    Blank Database Video: 599cd.com/Blank
    Access Developer Level 1: 599cd.com/ACD1
    Concatenation: 599cd.com/Concat
    Contact Management: 599cd.com/Cont...
    Invoicing: 599cd.com/Invo...
    AfterUpdate: 599cd.com/Afte...
    String Functions: 599cd.com/Stri...
    MsgBox: 599cd.com/MsgBox
    Quote, Invoice, Receipt: 599cd.com/Quot...
    Value From a Form: 599cd.com/Form...
    Favorite Customers: 599cd.com/Favo...
    On Click Event: 599cd.com/OnClick
    COURSES:
    FREE Access Beginner Level 1: 599cd.com/Free1
    $1 Access Level 2: 599cd.com/1Dollar
    FREE TEMPLATE DOWNLOADS:
    TechHelp Free Templates: 599cd.com/THFree
    Blank Template: 599cd.com/Blank
    Contact Management: 599cd.com/Cont...
    Order Entry & Invoicing: 599cd.com/Invo...
    More Access Templates: 599cd.com/Acce...
    ADDITIONAL RESOURCES:
    Donate to my Tip Jar: 599cd.com/TipJar
    Get on my Mailing List: 599cd.com/YTML
    Contact Me: 599cd.com/Contact
    TechHelp: 599cd.com/Tech...
    Consulting Help: 599cd.com/DevNet
    Twitter: / learningaccess
    en.wikipedia.o...
    products.offic...
    microsoft.com/...
    KEYWORDS:
    microsoft access, ms access, #msaccess, #microsoftaccess, #help, #howto, #tutorial, #instruction, #learn, #lesson, #training, #database, VBA, Choose Builder, Code Builder, Project Pane, Properties Pane, Immediate Pane, MsgBox, parameters, optional parameters, DoCmd.OpenForm, Set Value, Turn Off Choose Builder Box, Options, Object Designers, Always Use Event Procedures, Open Form to Specific Record, On Double Click Event, On Dbl Click, DblClick, If Then Else, Microsoft Access VBA, Access VBA Tutorial, Access VBA for Dummies
    QUESTIONS:
    Please feel free to post your questions or comments below. Thanks.

Комментарии • 57

  • @payvandsarandi6130
    @payvandsarandi6130 10 дней назад

    I cannot believe I just did my first VBA coding which was complicated enough. Like Patricia, I've been using Access for many years but not VBA. the "Coding" was so scary for me, but I DID it. Thank YOU, THANK YOU, THANK YOU!

  • @glennfelpel9785
    @glennfelpel9785 3 года назад +22

    You certainly are a very gifted trainer. Much appreciated thank you.

    • @599CD
      @599CD  3 года назад +3

      You are very welcome, and thank you for the compliment.

  • @GaylerdGuitar
    @GaylerdGuitar 11 месяцев назад

    Great job Richard, and excellent teaching.

    • @599CD
      @599CD  11 месяцев назад

      Thanks

  • @marshallgrads
    @marshallgrads Год назад

    Lol, just watched this tutorial and fell out of my chair when you mentioned programming on a Radio Shack TRS-80. We use to call trash-80s. Ah, storing data on cassette tapes, the good days all came rushing back❤

    • @599CD
      @599CD  Год назад

      I still remember the sound of my TRS-80, 300 baud modem connecting to the local BBS...

  • @letsgetdowntobusiness-
    @letsgetdowntobusiness- 2 года назад +6

    Richard, if you are still out there? I just want you to know that "YOUR THE MAN!"

    • @599CD
      @599CD  2 года назад +2

      Still here. Thanks. :)

  • @shahdtae439
    @shahdtae439 Год назад

    MR. Richard, Hello, Thank you for your Tech help.

  • @jessicasojka7507
    @jessicasojka7507 2 года назад

    I love your videos!!! Thank you so much sharing all of your knowledge.

    • @599CD
      @599CD  2 года назад

      You are so welcome!

  • @moodkn
    @moodkn 2 года назад

    Thanks Sir!
    Very useful and helpful exercise
    I had also needed it a lot, because I had worked on the Visual FoxPro Programing before it where VBA is not use , so sometimes it is very difficult to me to work on the VBA.

    • @599CD
      @599CD  2 года назад

      You are welcome!

  • @VincentAranda-z1h
    @VincentAranda-z1h 6 месяцев назад

    Just brilliant !!! second to none....

    • @599CD
      @599CD  6 месяцев назад

      Thanks I appreciate that

  • @lambertmuloya-vk2sx
    @lambertmuloya-vk2sx 7 месяцев назад

    Sorry how can I command save by using code, and after save I want my registration form to direct me to new field

  • @demenner8509
    @demenner8509 Месяц назад

    Your lessons are very helpfull. I am only stuck at 1 point: with the +1 button you state that "whatever the value is, it will add 1. But what if the value is empty (I do not want to start at zero) I need this to count my stock but if I fill in zero on al the articles it will go wrong when I import the file and have not counted all my stock....

    • @599CD
      @599CD  Месяц назад

      599cd.com/Ask

  • @AlwynMiller
    @AlwynMiller Год назад

    interested in your course for VBA is their any reduced rate for the complete course list available

  • @Anilsingh-vq2cv
    @Anilsingh-vq2cv Год назад

    very helpful thank you very much respected sir

    • @599CD
      @599CD  Год назад

      Most welcome

  • @muvaffaksarikahya8100
    @muvaffaksarikahya8100 Год назад

    Dear sir, Where can I found the discription for VBA commands such (docmd. , me.) . regards

    • @599CD
      @599CD  Год назад

      599cd.com/Developer

  • @karibayoumi8633
    @karibayoumi8633 2 года назад

    Hello Dear
    Thanks for your valuable videos
    I am trying to code an If statement between a subform and another separate form.
    I need after updating a Combobox in the subform to set an if statement: ( If the record in a field in the form equals the value updated in the combo box then a field in the same raw in the form becomes true )
    Could you please advise about the VBA Code.
    Thanks.

    • @599CD
      @599CD  2 года назад

      599cd.com/AfterUpdate

  • @LHPottery
    @LHPottery 2 года назад

    I remember the halcyon days when Access put code behind the buttons instead of marcos. Yeah, I'm old.

    • @599CD
      @599CD  2 года назад

      Yeah, that's going back to like 2000/2003, I think

    • @LHPottery
      @LHPottery 2 года назад

      @@599CD I go back to version 2. About the same amount of time as you!

  • @imjustsaying...3720
    @imjustsaying...3720 3 года назад +1

    that within a second of you mentioning "but first a word from our sponsors, and that's me!" You had me laughing so hard, that I just had to stop the video and comment. I didn't realize that you had both the color of your skin and your sex changed to an attractive Black woman promoting some college courses! Thank you RUclips for a good laugh LOL . But of course I clicked on the Skip Ad after a few seconds and returned to your video.

    • @599CD
      @599CD  3 года назад

      Ha ha. Black woman selling college courses, eh? RUclips must have just randomly placed a "real" ad at that spot in my video, because all I did was mention one of my other courses at that moment. But, I'm glad you got a good chuckle out of it. I do aim to entertain as well as educate. LOL

    • @599CD
      @599CD  3 года назад +4

      And hey... don't skip those ads! I need that 0.00003 cents from you watching that black woman! :)

  • @christiankranabetter2344
    @christiankranabetter2344 6 месяцев назад +1

    Hello Mr. Richard, I joined today this RUclips channel, it's really interesting and helpful. I'm quite new in this VBA in ACCESS and I looking for help for the following: I creating a database of staff members for our organization and since we're people from all over the world we have many different First Names, either one or two up to 3 or 4. And either with or without dash -. Also the length is variating a lot, but I need to specify this because I don't want people to make mistakes when they enter the data. Every single name should start with a capital letter. Where can I find help for this. Thank you Christian

  • @DAcutech
    @DAcutech 2 года назад +3

    You make learning so much fun. Thank you for sharing your invaluable knowledge.

    • @599CD
      @599CD  2 года назад

      My pleasure!

  • @alializadeh8195
    @alializadeh8195 Год назад +1

    Thank you ......

  • @leomaredcampos4941
    @leomaredcampos4941 9 месяцев назад

    I can't use docmd.close while opening other form

    • @599CD
      @599CD  9 месяцев назад

      Okay

  • @luzkrg
    @luzkrg 3 года назад +1

    What are the odds that just yesterday I was looking for exactly this… THANK YOU!!! 🤩

    • @599CD
      @599CD  3 года назад

      100% LOL - you're very welcome.

  • @m.ebrahimheydari6109
    @m.ebrahimheydari6109 3 месяца назад

    Dear Richard,
    I trust that this message finds you well. I am writing to express my gratitude for the exceptional training courses you have made available on RUclips. Your teachings have proven to be immensely valuable, and I eagerly look forward to learning more from you.
    In light of this, I kindly request that you provide me with the direct links to your other courses. I am certain that these resources will further enhance my understanding and contribute to my personal growth.
    Thank you for your unwavering dedication to sharing your knowledge and expertise. Your cooperation and attention to this matter are greatly appreciated.
    Warm regards,
    Ebo❤

  • @umairpioneer
    @umairpioneer Год назад

    Hey Richard, i have a question. I may sound silly in this but i will highly appreciate if you'd help me in this. imagine a scenario in which a customer has ordered two products of different values (say 200 dollars and 450 dollars). Here, I want to create a query table that shows the orders of 200 or above for a customer if he as at least one order of value 400 or greater? There are thousands of customers and orders are also in thousands.

  • @Saad-Sadiq
    @Saad-Sadiq 4 месяца назад

    Richard you're the best. King of Ms Access.

  • @easyspeak101
    @easyspeak101 10 месяцев назад

    Thank you Richard, easy to understand, thanks.

    • @599CD
      @599CD  10 месяцев назад

      Very welcome

  • @joeg9561
    @joeg9561 Год назад

    Do you still read all comments? ACCESS!!!

  • @TheRosboroughs
    @TheRosboroughs 11 месяцев назад

    Hi Richard - I am working on building out an Access database for a small business company in my town and I have a few questions. I wondered if you take paid consultation hours? Could I schedule some time to speak with you on the phone or over Zoom to communicate their specific wants/needs and get your assistance on how to apply them? Thank you so much.

    • @pjn2001
      @pjn2001 10 месяцев назад

      Hi there, did you ever come right?

    • @599CD
      @599CD  8 месяцев назад

      Sorry I don't do one-on-one consultations but you can see this page for people who might be able to help you 599cd.com/DevNet

  • @tutsecret499
    @tutsecret499 3 года назад

    how can I calculate age via VBA on the Age field inside the table. Thank you.

    • @599CD
      @599CD  3 года назад

      599cd.com/Age

  • @richardmeborg4717
    @richardmeborg4717 Год назад

    Hi Richard. How do I become a member?

    • @599CD
      @599CD  Год назад

      Click the blue Join button on RUclips or go to 599cd.com/THM

  • @teejayare2980
    @teejayare2980 2 года назад

    Love your work!