VB Code for Events

When you right-click on a form object and select 'Build Event' Access usually gives you a choice of three options:

  • the Expression Builder
  • the Macro Builder
  • the Code Builder

Most developers will always want to use the 'Code Builder' - the VBA editor - so that that can edit Visual Basic code and there is a simple way to bypass the options and get this automatically every time.

  1. Open a database.
  2. Select Options from the Tools menu
  3. Pick the Forms/Reports tab
  4. Click the tick box labelled 'Always use event procedures'
  5. Use the OK button to close the Options dialog.

The next time that you try to create code for an event Access will bypass the choices of Expression Builder and Macro Builder and will take you straight to the VBA code editor.

This works in all versions of Microsoft Access from 97 to 2002.

Access Tips

FoxPro Tips

General Tips

 

Related Items

Custom Toolbars

Your Access database will look more impressive if you add custom toolbars.

Read More

Frequent, automatic backups

How to create backups automatically in FoxPro or Access using the Windows Scripting Host

Read More

Trimming text in VBA and VFP

Both Visual FoxPro and Visual Basic for Applications let you trim leading and trailing spaces from string of text

Read More

Finding characters in VBA and VFP

Both Visual FoxPro and Visual Basic for Applications let you find the position of one character inside another string.

Read More

Changing between upper and lower case in VBA and VFP

Both Visual FoxPro and Visual Basic for Applications let you chnage text between upper and lower case.

Read More