709-218-7927

The Landfall Garden House

60 Canon Bayley Road

CANADA A0C 1B0

CPRGreaves@gmail.com

Home

Christopher Greaves

Access and the VBE

If you have dabbled in Word/VBA or Excel/VBA you'll be familiar with the sequence Tools, Macros, Visual Basic Editor to obtain the VBE. Access is somewhat different. A more general way to obtain the VBE from Access is to be in design mode (designing a form, for example) and right-click on a control then choose "Build Event" from the pop-up menu.

In the examples which follow we will assume that you have a fairly standard single-table database; the table is a list of contacts, and as such contains data fields such as "Name", "Address", "City" and so on, and as well contains some management data fields, "Date Last Modified" being one of them.

If you have an appropriate database table and wish to use it, we recommend that you make a complete backup of it before starting to modify it. We'd hate for you to inadvertently lose your data.

If You Don't Already Have a Form, Define One Now

Within Access choose Forms, New and elect the Forms Wizard. Choose your Client table as the source. Select all data fields by clicking on the double-caret pointing to the right. Choose a Columnar layout and a Standard finish. We will call this form frmClient - similar in name to our table.

You may want to re-arrange your Form by moving and re-sizing the controls into appropriate groups. For example, we have located our four telephone number fields to be close to each other, and our various date fields (added, last modified, last accessed and Follow-up) are close to each other on the form.

7092187927 CPRGreaves@gmail.com

Bonavista, Friday, December 04, 2020 5:52 PM

Copyright © 1996-2020 Chris Greaves. All Rights Reserved.