I’m plowing my way through writing the next chapter of the Microsoft Access for Beginners series and have the insomnia to show for it. This chapter, an introduction to Visual Basic for Applications, is one I’ve been wanting to do for awhile and should have done a long time ago but always found a way to put off. Writing chapters on the basics of forms and reports was easy compared to introducing the reader to a programming language with an entirely different environment from Access, an event-driven paradigm, variables, decision loops and all the other fun stuff that does questionable things to a person’s brain over years of exposure.
The other chapters have been rather large for web articles and the subject of this one is so much more complex that I’ve broken it up into sections to avoid sending the readers into shock. So far, the sections are lining up like this –
- Introduction – An explanation of the purpose of VBA and event-driven programming.
- Environment – An explanation of the programming environment and its elements.
- Procedures – Methods, functions and custom properties.
- Variables – Declaring and using variables to hold values for use in the program.
- Operators – Symbols used to carry out mathematical, comparison and other operations in VBA.
- DoCmd – I felt the DoCmd object which provides a variety of shortcut methods deserved its own section.
- Control Statements (multiple sections) – Decision loops and structures including IF…THEN, SELECT CASE and WHILE … LOOP.
- Algorithms – Once the syntax is understood, it’s time to learn how to design an actual procedure. Determining the path for getting the right results.
That’s not the end of it but after the section on algorithms, I’ll put it all together and consider Version 1.0 of the series ready for upload. Otherwise, it might take another few years. Future (near future, I promise) sections will include material on:
- Classes / Object-Oriented Programming
- Best Practices including commenting and error handling
- Getting Help
So, why am I doing this? All this work for a series of tutorials on a relatively obscure personal website? There’s probably a touch of OCD involved but it also has to do with the e-mails I’ve been grateful to receive over the years from people who’ve benefited from the series. I hope I’ve helped save some data along the way. It also keeps my brain active, my skills sharp, my credentials as a writer somewhat defensible and my resume polished. In the end, I figure everybody wins …
… or at least nobody gets hurt.
Stay tuned …