If you like my VBA Chapters, please donate so I can keep on writing.
thank you

watch! 2015 Microsoft MVP Virtual Conference on Channel 9 (MSDN) for Access
53 minute presentation

Here are 3 chapters of a book I started writing on programming with VBA -- the first part of the book uses Excel to program -- and then, the chapters that aren't written (yet?) go into Access. The basics of VBA are the same no matter what you use. This would be excellent for you to read and it shouldn't take that much time ... print it out and read a chapter each night before you go to bed ... no hands on, just reading for these chapters.

Access Basics Video Tutorials Learn VBA ListFiles Database Random Picker Error Handling Reference Database Whistles & Bells Help Examples Crystal's Analyzer Code Documenter

  1. Chapter 1 -- Getting Started Programming
  2. Although this chapter uses Excel to demonstrate VBA, the basics of VBA are the same in any application. If you learn about VBA code for Excel, you will know it for Access as well. The reason that Excel is used is because there is a bult-in macro-recorder, so it is easy to translate what you are clicking and picking into code. The best way to learn VBA (on your own) is to record what you do and then examine the code that is created. The code that the macro recorder writes is often clunky, so knowledge of streamlining things helps out tremendously.

    Become familiar with the VBE (Visual Basic Editor) window, Create and Run simple programs, Get Help.

    • Creating a simple program
    • Modifying code
    • Testing a Return Value Using Parenthesis
    • Getting Help
    • Getting User Input

  3. Chapter 2 -- Defining Variables
  4. This chapter includes a good reference for the main data types you can use when programming. The concept of data types is also especially important when you are setting up tables and fields in Access.

    Understand Variables and Data Types, AutoComplete, Indent code, Option Explicit and Option Base statements

    • Variables
    • Dim Statement
    • Option Explicit
    • Variable Names
    • Data Types and Dim Examples
    • AutoComplete
    • Indenting Code
    • TypeName Function
    • Arrays
    • Option Base Statement

  5. Chapter 3 -- Syntax
  6. Syntax is the structure of the word order in a line of code. Code lines are composed of Statements. A Statement can declare, define, calculate, test, assign, label, do . Statements must be syntactically complete and correct. I had intended to finish this book, but have yet to finish this chapter ... my intention was to provide more code examples ... but life being what it is, that didn't happen. Even still, this book is a valuable reference and a great introduction to the world of VBA.

    Become familiar with VBA syntax. Understand Objects, Properties, and Methods.

    • Syntax
    • If Then Else End If
    • Select Case Case Case Else End Select
    • Do...Loop
    • For...Next
    • While...Wend
    • Objects
      - Properties
      - Methods
      - Containers
      - Getting Help
      - Object Browser
    • Reference Libraries
      - VBA Library
      - Other Reference Libraries
      - Change or check references

Free Book on Access: Access Basics

Free Tutorials: Video Tutorials

for information on private programming and training, or if you have comments and ideas, I'd love to hear from you

Copyright © 2009-2012 Crystal Long | Last updated Nov 2012 |