VBA code not picking up Acess 2007 events

M

Marty

Howdy,
I am just starting to look at Access 2007 (having used 2002 previously).
My trial system has just one table and one form. The form was automatically
generated from the underlying table, but I added a button called "Test" that
should display a Msgbox message when clicked. (After positioning the button
on the form I had the system add the Test_Click() procedure header by using
the Events tab in the button's properties dialog). However, when I click on
the button nothing happens. When I set a break point on this procedure name,
it fails to produce a break. Also, when I add "Form_Current" or
"Form_BeforeUpdate" logic these procedures never seem to fire. Do I have to
do something to tell Access to turn on it's events logic?

Marty
 
M

missinglinq via AccessMonster.com

This is the hot topic of the day! I've seen it at least a dozen times today!
I understand that VBA support is, by default, turned off in ACC2007. You need
to try Help to find out where you need to go to enable it!

Good luck!
 
M

Marty

Howdy Missinglinq,

You are correct, although it might be a little clearer to say that VBA
usage requires conforming to new Office 2007 security requirements. I don't
have all the jargon down, so some of this may not be correct. However, it
appears that VBA will only run if either (1) the code is somehow associated
with a digital certificate attesting to the trustworthy qualities of the code
provider or (2) the code is run from a "Trusted Location". I was able to
get around my problem by instructing Access to treat the folder that contains
my database as a trusted location. The steps are:
1. Click the Office button to get a dropdown list.
2. The dropdown list has a button "Access Options" at the bottom, click it.
3. This brings up a dialog box with a "Trust Center" option in the left
pane, click it.
4. The new dialog view has a button called "Trust Center Settings...", click
it
5. That opens a Trust Center dialog, click the "Trusted Locations" option
6. In the new Trust Center view, click Add New Location to point to your
folder.

thanks for your pointer!

Marty
 
Top