Effective databases can be created using Microsoft Access. However, if more complex databases are required you must write code using a programming environment called Microsoft Visual Basic for Applications (VBA). By using VBA code, it is possible to overcome the limitations of using macros. A typical Access VBA course for Windows will begin with an introduction to programming in Microsoft Access. It will then move on to cover the use of procedures, functions, objects and expressions, how to work with recordsets and how to control program execution.
Learning the principles of error handling is another particularly important goal for students of Access VBA. A major difference between an amateur and a professionally developed Microsoft Access application is its' ability to deal with problems. Access implements VBA error handling at procedure level. By adding VBA error handling code to your MS Access applications, it is possible to prevent crashes and error messages.
In simple terms, when programmers write code they should be able to anticipate as many problems as possible and attempt to deal with these problems early on. This means coding for error conditions that may arise when your database is running.
There are three main types of problems:
Syntax or user data entry errors arise from the inclusion of mistyped words or incorrect expressions in your code.
Run-time errors are problems faced by users when interacting with your database because the programming environment cannot correctly execute a program statement.
Logic errors are undeclared errors that prevent your code from compiling. These tend to be vague and difficult to fix.
Debugging is another important skill for a developer, especially as code gets more complex. MS Access has been designed to include powerful debugging tools which do not work on built-in macros. To debug code you need to run your code line by line to see what is happening. The next step is to construct a subroutine which calls the function. You need to set a breakpoint inside the function which is a selected line of code that, once reached, will cause your program to become suspended. Then you can use the VBA debugging environment to view the status of your program, step through each successive line of code, continue or halt execution of the code. Other debugging tools include the immediate window and the watch window.
By attending an Access VBA course, it is possible for you to master these and other concepts and ultimately, help you to build more complex databases.
You have permission to publish this article for free providing the "About the Author" box is included in its entirety.
Do not post/reprint this article in any site or publication that contains hate, violence, porn, warez, or supports illegal activity.
Do not use this article in violation of the US CAN-SPAM Act. If sent by email, this article must be delivered to opt-in subscribers only.
If you publish this article in a format that supports linking, please ensure that all URLs and email addresses are active links, without the rel='nofollow' tag.
Software Training London Ltd. owns this article. Please respect the author's copyright and above publication guidelines.
If you do not agree to these terms, please do not use this article.
"This was fantastic. I feel more confident not only for PowerPoint but for other MS Office applications as well (and that's even though I've taken Excel and Word courses too!). I really liked the instructor's engaging teaching style. He used a lot of analogies which made things interesting and helpful to remember. I'm more excited to use PowerPoint, and feel more confident in my work role. Thanks!"
HRE Group Associate
"A very good course as it gives the possibilities of using Excel 2007 although I would not use all the features."
"Hi,
I was very impressed with the course. The material was very well laid out and Doug went on a comfortable pace allowing all trainees to interact openly. He made sure each one of us have understood the topics and are able to carry out those functions on excel. The practice exercises were very precise and helped to grasp the topics efficiently. I will definitely recommend STL to my colleagues and friends.
Thanks
Amar"