|
|
 |
 |
|
Join the Discussion
|
Have you created a system using VBA Automation ?
Tell us about it!
|
|
 |
 |
|
|
 |
 |
|
|
 |
 |
|
|
 |
Since this is an introduction to VBA, and not Access, the example that will be used here is the most simple possible Access 2000 VBA application. We're going to jump to the ancient past and actually use an Access object that simply calls old Access macro language instructions ... which are seriously out of date today but are still used by the Microsoft Access 2000 Wizards anyway. There may be a lot of people who read this article and protest that "Hey! There are a lot of much better ways to do databases in Access VBA!" My answer (in advance) is, "Yes! There are! And I invite you to consult the About Databases site to learn about them (databases.about.com). But teaching you all about Access isn't what this article is about. It's about VBA."
Our Access VBA sample application will again be a combination application with Word being thrown into the mix along with Access. We're going to take a favorite verse from a poem by Lewis Carroll (of "Alice in Wonderland" fame) called, "The Walrus and the Carpenter" and copy it, line by line, into an Access database from a Word document. While this may not be a glowing business application, the basic ideas certain could be used in one. For example, saving comments from documents sent in by customers in a database. Besides, if you're a fan of Lewis Carroll as I am, sorting the lines of his poems randomly could make them make more sense.
To start our appplication, first create a blank Access database. Click New to create a single table with just a key field and a memo field in Design View. Here's the table you should create:

Next page >
The Access Form: Our VBA Container > Page
1,
2,
3,
4
5,
6
|