admin
Recordset In VBA – PT2
There are times when you will need to access your data programatically and you will have to create the recordset in VBA rather than from the built in data connection Access provides. ADO is a superset of DAO in functionality point of view. The primary benefit of using the ADO recordset object is: -Ease of […]
Recordset In VBA – PT1
In these next 2 videos, we are going to discuss generating the recordset in VBA techiques: -We will access data in tables by using the ADO recordset object. -We will retrieve data from a table using SQL and ADO recordsets. -We will alter the data in the table using SQL and ADO recordsets. In this […]
VBA For Loop
Use the VBA For Loop when you know how many iterations the code should make. Using this VBA For Loop will allow you to loop for a specific number of times. Take a look at the video: The syntax for the VBA For Loop is: ****************************************** For counter= start To end [Step backward count (how […]
VBA Do Loop
Looping structures like the VBA Do Loop allow you to specify the conditions under which you would like your program to run a set of code statements repeatedly. There are 4 different variations of the VBA Do Loop we are going to look at: ‘Do While…Loop structures check the condition before running the code. ‘The […]
VBA Error Handling PT2
In this VBA Error Handling set I’ll talk about using the error object Here is a chart referencing the Error object’s properties for you to reference: Property Description Number The number of the error. Description The description of the error. Source The name of the object or application that originally generated the error. …CODE EXAMPLE […]
VBA Error Handling PT1
In this VBA Error Handling set (1 & 2) we’ll talk about: Trapping run-time errors Creating error handlers Using the error object There are 3 main types of VBA Errors: 1. Syntax Errors 2. Logic Errors 3. Run-Time Errors Syntax errors result when the logic is misspelled, or a wrong keyword is used. The VBA […]
VBA Debug Part 1
In this video I talk about VBA Debug aspects like setting breakpoints, viewing the current state of variables, and stepping through code. …as well as: Set breakpoints to stop program execution. Test variables in the immediate window. Monitor variable values in the Locals window. Here is the video: Private Sub btnValidate_Click() If IsEmailAddress(Me.txtEmail) Then MsgBox […]
A Variable Scope
Key points: A private procedure can be called from any procedure in the same module. The default scope for a sub procedure is “Public” unless you specifically designate it as Private. Store all your procedures and functions you plan to use in your application in “Modules”, which you can call from your other database objects. […]
How To Make A VBA Function
This video will cover the following: –How to call built-in and custom vba functions in an application. –How to create a custom vba function. Here’s the video: There are 2 types of functions, “Built-in” and “Custom” functions. Buit-in functions are functions Access provides. Custom functions are vba functions you create because Access doesn’t provide a […]
MS ACCESS FORM VALIDATION – PT4
In this video we will cover VBA validation functions like: Validating Text Strings Check the string for null values. IsNull function Check the length of a string. Len Function Check the presence of characters present in a string. InStr function Inpect a portion of a string. Left, Right, Mid functions Removing the leading or trailing […]