1. Home
  2. Computing & Technology
  3. Visual Basic
VBA - Accessing Access
Part 3: Coding the Access Example
 More of this Feature
• Part 1: VBA - Accessing Access
• Part 2: VBA in Access
• Part 4: The Access Form: Our VBA Container
• Part 5: VBA Code Calling the Excel Server
• Part 6: The VBA Code
 
 Join the Discussion
Have you created a system using VBA Automation ?
Tell us about it!
 
 Related Resources
• Beginning Visual Basic
• Visual Basic 6
 
 Elsewhere on the Web
• Updates from Microsoft
(Browse to Office 2000)

 

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.

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:

The Access Example Table



Next page > The Access Form: Our VBA Container > Page 1, 2, 3, 4, 5, 6
Explore Visual Basic
By Category
About.com Special Features

The Best Web Trends of the Decade

A look back at the best innovations, ideas and technologies over the last 10 years, More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Visual Basic

©2009 About.com, a part of The New York Times Company.

All rights reserved.