Getting Started with MS Access Visual Basic for Applications - VBA Code-Behind and Modules

  Рет қаралды 14,944

Sean MacKenzie Data Engineering

Sean MacKenzie Data Engineering

Күн бұрын

Пікірлер: 24
@khabathawrami
@khabathawrami 2 жыл бұрын
Your videos about Ms Access and VBA are great .. Thank you
@seanmackenziedataengineering
@seanmackenziedataengineering 2 жыл бұрын
Glad you like them! Thanks!
@mohamedAccurate
@mohamedAccurate Жыл бұрын
Thanks for the great effort. I need to paste a value into a selection rows in the table through VBA Code
@seanmackenziedataengineering
@seanmackenziedataengineering Жыл бұрын
Thanks! You could try just doing an update query: kzbin.info/www/bejne/b3Slqad4rtGGrKc You can use the VBA in this video that shows how to update/add a value via VBA code: kzbin.info/www/bejne/p6eQqaVor6d2eqM In the line rst.Add, use rst.Edit instead. Make sure you put an if statement in there too (if you need it) ie. if MyType = 'ABC' Then rst.Edit rst!MyField = SomeValue rst.Update End if
@jamesmartinez9069
@jamesmartinez9069 2 жыл бұрын
Magnifica enseñanza, diez mil gracias señor Sean
@seanmackenziedataengineering
@seanmackenziedataengineering 2 жыл бұрын
Me alegro de que haya ayudado. Gracias!
@davegoodo3603
@davegoodo3603 10 ай бұрын
Hi Sean, I'm taking a walk through this playlist. I have VBA experience in Access but I want to do an intro to see if there are gaps in my knowledge. I hope to do the Intermediate and Advanced as well so that I'm really prepared for a project I'm involved in. I've checked out some of your videos and I feel confident that you will have the info I'm looking for. Thanks as always, on with the show! I watched this intro video Sean, you do set a fairly steep learning curve. The focus was mainly on visibility and getting the difference between Public & Private and how that relates to forms and modules. You didn't mention your prefix "p" for public variables, if I was brand new I'd wonder what that was. Anyway, I'm sure an intro to anything is going to be challenging because there's so many bases to cover. I don't want to sound too critical, your relaxed style always makes the content easy to follow even if at times it can be distracting. I'm going to continue with the next in the series. Thanks Sean.
@seanmackenziedataengineering
@seanmackenziedataengineering 10 ай бұрын
Hey Dave, many thanks and I'm always interested in constructive feedback. I concede that my methods can be a bit jarring. Generally I try to avoid providing an encyclopedic, classroom style of learning that you can find everywhere and instead focus on breakthroughs. If I am an analyst working on my prototype, what can I do right now? What are the levers I can apply? In broad strokes, how does it all come together? Will this technique even get me where I need to go? How can I go from A to B without going into the minutiae of why (right now)? My style comes from decades of office and shop-floor mentoring of professionals who are already mid-stride in any task. I provide the breakthroughs in situations where I know smart, tech-savvy learners will actively research documentation for detail anyway. Again, I always appreciate the feedback! Since I made this video I am trying to make the lessons more approachable while still focusing on breakthroughs.
@davegoodo3603
@davegoodo3603 10 ай бұрын
@@seanmackenziedataengineering Hi Sean, Understood. I now know more about your presentation style, thank you. Thanks for getting back to me, I really appreciate that.
@garcimat
@garcimat 2 жыл бұрын
Your videos are the best
@seanmackenziedataengineering
@seanmackenziedataengineering 2 жыл бұрын
Thanks! Glad you enjoy them, cheers
@finvictho8484
@finvictho8484 9 ай бұрын
Can I set Access talk off (no any prompts from access )while using Querry update function.
@seanmackenziedataengineering
@seanmackenziedataengineering 9 ай бұрын
DoCmd.SetWarnings False DoCmd.RunSQL "Update MyTable Set Field1 = Forms!MyForm!txtMyField Where ID = 123;" DoCmd.SetWarnings True
@matthewb5235
@matthewb5235 10 ай бұрын
Hi Sean. I appreciate your videos, so thanks first of for making them available. That's getting started, but where would you suggest going to to find a course in VBA? Any thoughts? Udemy? CodeAcademy? A college online course? Are you aware of any you like? There are so many. And I should perhaps add, a course that you provide but I think you might not be focused of the basics so to speak, but coding techniques for more experienced Access users.
@seanmackenziedataengineering
@seanmackenziedataengineering 10 ай бұрын
Great question - there are lots of good resources out there. I have found that people generally do better if they pick some kind of project to do, then learn concepts, researching as they go here on YT, stackoverflow, and other programming sites. VBA is great, but you should also learn database concepts early in your study. Soooo many programmers learn how to program in (insert language here) and work for years, then are blindsided on the first time they have to actually design a database or data repository for a project. Pay attention to your data concepts as you go! Any course from a reputable source will be good to get you started with VBA; just complement it with a data project of your own.
@charleskent6795
@charleskent6795 2 жыл бұрын
This is a excellenf intro to VBA. One question: at 18.49, what did you do to "run the function" and open the OUR_MODULE window?
@seanmackenziedataengineering
@seanmackenziedataengineering 2 жыл бұрын
Thanks! At 16:55 I go to the Create ribbon and then Module. This creates a general module that by default has Sub and Function code blocks that you can use throughout your app. Unlike the button click event code we created earlier, you can call them from code in your form modules' click events etc. This allows you to use one function many times ("code re-use") instead of copy-pasting code over and over. This makes your code more efficient and easier to maintain.
@charleskent6795
@charleskent6795 2 жыл бұрын
Thank you for your speedy respose! . I understood that. My question is more about navigation. At just before 18.49, running your video at 1 quarter speed I saw your mouse movements, hoping to see what you pressed to make the module code window pop up, but it suddenly popped up without me seeing what you did. I am completely new to access, and learning it to wean myself off Visual FoxPro.
@seanmackenziedataengineering
@seanmackenziedataengineering 2 жыл бұрын
@@charleskent6795 Ah ok! I had the code window minimized and just brought it back to focus. However, you can use Ctrl+g to bring the Immediate Window to view which in turn brings your code editor up as well. I ran it by putting the cursor within the code lines of the Sub and then pressing play on the toolbar. This only works for Subs, which you can also run by simply typing their name in the immediate window and pressing enter. If your sub has arguments then you should just use the immediate window. To run a function, put ? just before your function name and with () or arguments to execute that function. You can also use the Immediate Window to get a value from your open form or to run an expression for basically anything. Ex. ?Forms!MyForm!txtMyTextForm will return that value. Good for finding excess spaces and funky entries.
@charleskent6795
@charleskent6795 2 жыл бұрын
Brilliant. Thank you so much. Things like that take ages to find out and are really useful.
@krishnakuraku6853
@krishnakuraku6853 3 жыл бұрын
Can you please do a video on how to write and execute stored procedure or function in python..?
@krishnakuraku6853
@krishnakuraku6853 3 жыл бұрын
This is related to snowflake
@seanmackenziedataengineering
@seanmackenziedataengineering 3 жыл бұрын
That is a great video suggestion. Stay tuned!
@seanmackenziedataengineering
@seanmackenziedataengineering 3 жыл бұрын
kzbin.info/www/bejne/mHy0mIekn8eYl68 Thanks for the request! Cheers
VBA MsgBox - How to use message boxes in MS Access
13:29
Sean MacKenzie Data Engineering
Рет қаралды 5 М.
Mom Hack for Cooking Solo with a Little One! 🍳👶
00:15
5-Minute Crafts HOUSE
Рет қаралды 20 МЛН
99.9% IMPOSSIBLE
00:24
STORROR
Рет қаралды 26 МЛН
How many people are in the changing room? #devil #lilith #funny #shorts
00:39
How to Open a RecordSet in Access VBA and Loop Through the Records
12:45
Sean MacKenzie Data Engineering
Рет қаралды 27 М.
An Introduction to VBA Code in Microsoft Access
9:51
MyExcelOnline.com
Рет қаралды 21 М.
How to Use Global Variables in Microsoft Access VBA
13:25
Sean MacKenzie Data Engineering
Рет қаралды 9 М.
Basic Programming with Microsoft Access / VBA
29:46
Andrew Comeau
Рет қаралды 13 М.
How to Make Cascading Combo Boxes in MS Access
16:08
Sean MacKenzie Data Engineering
Рет қаралды 32 М.
WOW 😱 How to Make AirPods from Regular Headphones
0:47
ALABAYCHIC
Рет қаралды 18 МЛН
Никогда так не делайте #сборка #пк #pcbuild
0:17
XDOT PC - Игровые ПК
Рет қаралды 2 МЛН