MS Access VBA Control Events – PT2
In this video we are going to cover the following MS Access VBA Control Events:
AfterUpdate
BeforeUpdate
NotInList
This is part 2 of a 3 part video series.
Private Sub cboBookTitles_NotInList(NewData As String, Response As Integer) Dim strMsg As String Dim strForm As String strForm = "frmAddBookTitle" strMsg = "Sorry, '" & NewData & "' is not a current book title. Would you like to add it?" Select Case MsgBox(strMsg, vbYesNo, "Add Book?") Case vbYes 'NewData is the data entered into the combo box DoCmd.OpenForm strForm, , , , acFormAdd, acDialog, NewData 'Suppress the Access error message Response = acDataErrAdded DoCmd.Close acForm, strForm Case vbNo MsgBox "You must select an item from the list or add a new one.", vbExclamation, "Information" 'Return the Access error message Response = acDataErrContinue End Select End Sub Private Sub txtAddress_AfterUpdate() MsgBox "Change was completed" End Sub Private Sub txtAddress_BeforeUpdate(Cancel As Integer) If MsgBox("Save Changes?", vbYesNo) = vbNo Then Cancel = True MsgBox "Change will not be saved." End If End Sub
<< MS Access VBA Control Events – PT1 | MS Access VBA Control Events – PT3 >>
MS Access VBA How To – Free Tutorial Reference
Click if you need help now. | |
Click here to learn how to put your MS Access database on the web. |
|
Make sure you sign up for this now: |
|
Welcome to vbahowto.com! We hope you find the information you need! If you need help on something you can’t find, Click here to ask it on our contact form. |
|
Free VBA Helps: |
Module 1Free Access programming tutorial Video 1
Free Access programming tutorial Video 2
Free Access programming tutorial Video 3
Free Access programming tutorial Video 4
Free Access programming tutorial Video 5
Free Access programming tutorial Video 6
Free Access programming tutorial Video 7
Free Access programming tutorial Video 8
Free Access programming tutorial Video 9
Free Access programming tutorial Video 10
Module 2
VBA Event Driven Programming
VBA Form Object Event Procedures
MS Access Form Events – PT1
MS Access Form Events – PT2
Module 2b
MS Access VBA Control Events – PT1
MS Access VBA Control Events – PT2
MS Access VBA Control Events – PT3
Module 3
MS ACCESS FORM OBJECTS – PT1
MS ACCESS FORM OBJECTS – PT2
MS ACCESS FORM OBJECTS – PT3
|
Module 4
MS ACCESS FORM VALIDATION – PT1
MS Access Validation – PT2MS Access Validation – PT2 (explained)
MS Access Validation – PT4
Module 5
How To Make A VBA Function
VBA Variable Scope
Module 6
VBA Debug Part 1
VBA Debug Part 2
Module 7
VBA Error Handling PT1
VBA Error Handling PT2
Module 8
VBA Do Loop
VBA For Loop
Module 9
Recordset In VBA – PT1
Recordset In VBA – PT2
Recordset In VBA – PT3
Recordset In VBA – PT4
|
All Posts (Most Recent To Past)
|
|
||||||||||||||
If you just need the database, search for the title of the video by using the CTRL + F (Find) functionality of your browser. Then click the post title. Thank you. | ||||||||||||||
(MS Excel VBA training? Click Here) |
||||||||||||||
Still need help? Click and call LoeblCom Services | ||||||||||||||
Click here for the database used in most of the modules: Nwind_2k_modified.mdb |
||||||||||||||
Find The Best VBA Tutorial Video To Watch Based On Your Needs, or start at the top of the list and move down sequentially through the modules (Modules 1-8) to view the ENTIRE 30+ DAY COURSE at your own pace! | ||||||||||||||
How can I help you? |
[si-contact-form form=’1′] |
Need Help? Click And Call LoeblCom Services
If you’ve been helped, consider giving us a tip. Thanks!
($5 suggested amount)
(…10% of your gift amount will go to charity)
Testimonials from some of those helped by this site:
I have been through the VBA training videos, I like very much.
Thank you very much for you thoughts for training free of charge…
Thanks Erik
Regards
Kalyana
Hi Mr. Erik,
Every thing is ok. I would say that you have done a wonderful job. I pray to God that may HE bless you and guide you to the RIGHT PATH and expand your
knowledge more for this service you have done for humanity.
Thanks much for educating me.
Usman
Dear Erik,
… I found
the 1-10 lessons extremely helpful because you are going through creating
something from start to finish by experience…I really appreciate your tutorials.
Thanks,
Jeremy
Hi Erik
Everything is great how it is. The lessons are easy to understand and interesting.
You’re doing a brilliant job and I’m learning a lot.
Probably the best video learning resource on the net in my opinion. I’d just like to
see more videos on any topic regarding Microsoft Access.
And always look forward to watching when I get an email for a new video link. You
have so much knowledge about Access. I don’t know how you remember it all.
… I’m good with GUI design but struggle a bit with VBA and Coding but you’re
making it easier for me to comprehend things. I really liked your record set and vba
videos. They were really interesting and I have more of an understanding now from
them.
I for one appreciate your work and efforts
Thanks very much Mate
Mars – Australia
Hi Sir,
Thank you so much for sharing your knowledge freely with the world.Thanks for all I
enjoy learning Access and VBA through your videos. I found the answers to my worries
learner in your videos
God bless you
Joean – France
“I watched some of your videos, I think they are great…” – Thanks Emad
“This site is absolute the best to me. I never knew I could be a programmer on my
own. I am absolute greatful to Erik Loebl and management.” – Kelvin
IT IS TOO GOOD, THANX – Aditya
“Thanks so much, am so grateful…”
MS Access VBA Programming All 9 Video Modules
“You want to be an Access guru and be more valuable at your job don’t you?”
Give Yourself An Access VBA Education At Your Own Pace For Just $1!
MS Access VBA Programming All 9 Video Modules!
Erik Loebl (Author)
List Price: $89.99
Price: $55 $1
You Save Over: $50!
In Stock.
(Immediate Download!)
Get it now, while the price is this low!
This is Microsoft Certified Training You Would Normally Pay Over $200 At The Computer Training Center.
Get Your Immediately Downloadable Copy Now!
Special Offer
$55 NOW ONLY $1(limited time)!
AFTER YOUR PURCHASE PLEASE WAIT TO BE REDIRECTED BY PAYPAL TO THE “DOWNLOAD YOUR PRODUCT” PAGE.
Video Set Details
You want to be an Access guru and be more valuable at your job don’t you?
Give Yourself An Access VBA Education At Your Own Pace And Get Personalized Guidance For Just !1
This Set Has All The Modules. Over 4 hours of Training! If you want to be proficient in MS Access Programming, you need this course.
Look at all you are going to get for just $1 (limited time!)!
Access VBA Module 1 Videos:
You’ll be learning:
An Overview Of VBA Modules And Procedures And How They Can Help Your Program (17 minutes 15 seconds)
How To Declare VBA Variables (17 minutes 58 seconds)
How To Make An Input Box To Accept Values From The User (and more) (29 minutes 6 seconds)
How To Make VBA Condition Statements Like The “If” And “Select Case” Statements, And How They’ll Help Your Program’s Logical Flow. (25 minutes 27 seconds)
You’ll Be Shown VBA Condition Statements Examples (8 minutes 25 seconds)
You’ll Find Out how to better organize your code by calling another procedure in your module, and unit wrap up (17 minutes 8 seconds)
You’ll come away from these lessons empowered with confidence to write VBA procedures, work confidently with VBA Modules, how to navigate the VBA code window, how to creating a VBA sub procedure, how to work with VBA variables, how to declaring variables in VBA, how to use VBA datatypes for an efficient application, how to run VBA code to test it, discover different ways to use the VBA message box, how to work with VBA variables efficiently in your application with the Dim statement.
Access VBA Module 2 Videos:
In this exciting module, you’ll find:
How to use MS Access form events to your advantage in your program to help you extend Access’ abilities!
You’ll discover how to create an event procedure, how to reacting to user actions programmatically.
You’ll find out how to benefit from using the DoCmd object
You’ll learn program flow of events (“If this happens, do this, etc.”)
You find out how to control the MS Access Form Open Event, and how To Cancel Open Event,MS Access Message Box,,MS Access Form Caption,MS Access Form Calculation,MS Access Form Current Event,MS Access Form Open Event,MS Access Form Load Event,MS Access Form_Delete,MS Access Form_Unload,MS Access Form_Close
MS Access Form Events – PT1 (6 minutes 50 seconds)
MS Access Form Events – PT2 (7 minutes 29 seconds)
Access VBA Module 2b Videos:
In this module you’ll find out how to leverage the control’s abilities on your form:
You’ll discover topics like using option frames, option buttons, command buttons, and you’ll learn how to program “pick lists” to give your users the power of choice.
You’ll find out about control events like the Frame and Option Button Events, Command Button Events, Drop Down Box Events, Click, DblClick, GotFocus, LostFocus, DblClick, Change, AfterUpdate, BeforeUpdate, and NotInList events.
MS Access Control Events – PT1 (5 minutes 31 seconds)
MS Access Control Events – PT2 (5 minutes 13 seconds)
MS Access Control Events – PT3 (5 minutes 32 seconds)
Access VBA Module 3 Videos:
In this lesson you will find out about the powerful forms collection. You’ll learn form objects referencing so you can reference your form objects from various places in your database application.
You are going to learn different ways to reference your form from different locations in your database. You’ll discover how to create a “Calculate Function”, group action with a “With / End With” Statement, use “DoCmd.OpenReport” to professionally open reports, and the “OpenForm” method is described, so you can create a professionally designed switchboard.
MS ACCESS FORM OBJECTS – PT1 (6 minutes 15 seconds)
MS ACCESS FORM OBJECTS – PT2 (4 minutes 58 seconds)
MS ACCESS FORM OBJECTS – PT3 (7 minutes 54 seconds)
Access VBA Module 4 Videos:
Here you are going to learn some valuable validation techniques to ensure the integrity of your data entry.
You’ll discover table & form validation like field entry input masks, database validation rules.
You’ll find out how to validate text strings, how to validate the integrity of your entries by checking the string for null values.
Here are some functions you’ll learn: “IsNull” function, the “Len” Function, the “InStr” function, and other VBA String functions. You’ll find out about validation functions for tasks like, Validating Numbers, the “IsNumeric” function, and date validation, the “IsDate” function.
MS ACCESS FORM VALIDATION – PT1 (6 minutes 11 seconds)
MS ACCESS FORM VALIDATION – PT2 (6 minutes 16 seconds)
MS ACCESS FORM VALIDATION – PT3 (5 minutes 30 seconds)
MS ACCESS FORM VALIDATION – PT4 (6 minutes 13 seconds)
Access VBA Module 5 Videos:
You’ll Learn How To Make A VBA Function (6 minutes 25 seconds)
You’ll Learn About VBA Variable Scope (5 minutes 51 seconds)
Access VBA Module 6 Videos:
In these modules you will be able to find out how to troubleshoot your code through using breakpoints, and variable monitoring with the Watch window.
You be able to output the results of your variables into the immediate window, and learn to use the locals window to monitor what is happening in your code now.
VBA Debug PT1 (6 minutes 25 seconds)
VBA Debug PT2 (5 minutes 51 seconds)
Access VBA Module 7 Videos:
In this module you will learn how to professionally handle errors in your application, you will be able to handle division by zero errors, handle the invalid use of the null characters in your variables, and handle variable overflow errors.
You’ll find out about VBA Error Handling objects like the useful VBA Err Object.
VBA Error Handling PT1 (2 minutes 22 seconds)
VBA Error Handling PT2 (5 minutes 58 seconds)
Access VBA Module 8 Videos:
Here you are going to learn how to efficiently loop through your data recordsets using the “For” and “Do” Loops
VBA Do Loop (6 minutes 24 seconds)
VBA For Loop (5 minutes 35 seconds)
Access VBA Module 9 Videos:
Learn to be flexible with your data using recordsets. You’ll be learning how to a DAO and ADO recordset in VBA
You’ll learn how to use the methods of the recordset object, like the moveFirst, moveLast, moveNext, movePrevious, EOF, BOF
And, last but not least, use learn how to Use SQL to select and modify records.
Recordsets In VBA PT1 (6 minutes 12 seconds)
Recordsets In VBA PT2 (5 minutes 57 seconds)
Recordsets In VBA PT3 (6 minutes 22 seconds)
Recordsets In VBA PT4 (5 minutes 54 seconds)