embedded macros vs event procedure (1 Viewer)

jmlight

Registered User.
Local time
Today, 02:38
Joined
Feb 6, 2009
Messages
54
I am using the Button Wizard to open a form. When I review the property sheet under Event - it calls up an Embedded Macro.

How do I get it to be an Event Procedure automatically instead of an imbedded macro?
 

HiTechCoach

Well-known member
Local time
Today, 01:38
Joined
Mar 6, 2006
Messages
4,357
I am using the Button Wizard to open a form. When I review the property sheet under Event - it calls up an Embedded Macro.

How do I get it to be an Event Procedure automatically instead of an imbedded macro?

Per Microsoft, you can't change the default at this time.

I am hoping this will be fixed in the SP2 update.
 

Banana

split with a cherry atop.
Local time
Yesterday, 23:38
Joined
Sep 1, 2005
Messages
6,318
You can check "Always Use Event Procedure" for either 2003/2007 (earlier version may have it, but I don't know for sure.

2003:

Tools -> Options, Form/Reports

2007

Office button -> Access Options -> Object Designer
 

jmlight

Registered User.
Local time
Today, 02:38
Joined
Feb 6, 2009
Messages
54
Thanks - I'll look for where that option might be
 

Banana

split with a cherry atop.
Local time
Yesterday, 23:38
Joined
Sep 1, 2005
Messages
6,318
:confused:

I might not be understanding something, but I created a new button using wizard, selected random action. I went to the button and it had [Event Procedure] for the click event and I can open the code behind the form for and see the code for that button....

:confused:
 

Banana

split with a cherry atop.
Local time
Yesterday, 23:38
Joined
Sep 1, 2005
Messages
6,318
Aha, now I just figured out my confusion.

Though I was using 2007, I was dealing with .mdb which writes code, but if I use a .accdb, macros is used instead!

Now I feel like a silly goose. :eek:
 

HiTechCoach

Well-known member
Local time
Today, 01:38
Joined
Mar 6, 2006
Messages
4,357
Aha, now I just figured out my confusion.

Though I was using 2007, I was dealing with .mdb which writes code, but if I use a .accdb, macros is used instead!

Now I feel like a silly goose. :eek:

Banana, it happens to the best of you gurus.

What is also bad is that if you downgrade an 2007 database that used the wizards to create command buttons with embedded macros, they will not work. You have to manually edit ever command button and convert the embedded macro to VBA code. :eek: :( :mad:
 

Users who are viewing this thread

Top Bottom