How do I stop the control wizrd from creating embedded macros?

  • Follow


I want the control wizard to create VBA code, not embedded macros.  I checked 
the "Always use event procedures" box in the Access Options - Object 
Designers, but the wizard still creates embedded macros instead of VBA code 
(tried several combo boxes and command buttons on different forms).  What am 
I missing?
0
Reply Utf 11/7/2007 4:30:00 AM

What version of Access?

I've never seen the wizard create a macro, although I haven't used the 
wizard in Access 2007.

-- 
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"David Semon" <DavidSemon@discussions.microsoft.com> wrote in message 
news:FCB60FCA-B311-446D-9F51-ED0E2ED68DB1@microsoft.com...
>I want the control wizard to create VBA code, not embedded macros.  I 
>checked
> the "Always use event procedures" box in the Access Options - Object
> Designers, but the wizard still creates embedded macros instead of VBA 
> code
> (tried several combo boxes and command buttons on different forms).  What 
> am
> I missing? 


0
Reply Douglas 11/7/2007 1:45:50 PM


Sorry ... Access 2007.  By default, Access 2007 creates embedded macros (new 
in 2007 - I think).  By changing the option setting, it should create VBA 
code instead.  But, for some reason, I can't get it work.

"Douglas J. Steele" wrote:

> What version of Access?
> 
> I've never seen the wizard create a macro, although I haven't used the 
> wizard in Access 2007.
> 
> -- 
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no e-mails, please!)
> 
> 
> "David Semon" <DavidSemon@discussions.microsoft.com> wrote in message 
> news:FCB60FCA-B311-446D-9F51-ED0E2ED68DB1@microsoft.com...
> >I want the control wizard to create VBA code, not embedded macros.  I 
> >checked
> > the "Always use event procedures" box in the Access Options - Object
> > Designers, but the wizard still creates embedded macros instead of VBA 
> > code
> > (tried several combo boxes and command buttons on different forms).  What 
> > am
> > I missing? 
> 
> 
> 
0
Reply Utf 11/7/2007 2:00:02 PM

Douglas:

FYI: In my search for an answer (which I still do not have), I came across 
this article which explains why Access 2007 has embedded macros:

-------------------------------------------

Saturday, April 21, 2007 4:26 AM clintc 
Reader question about macros and VBA 
A reader recently asked:

Is there any way on Access 2007 to keep wizards and Switchboard Manager 
coding in VBA, any way developers "HAVE" to code for most applications.
If a customer is buying an apllication from us, he is not going to trust 
what he bought?.
Switchboard manager was great in its code handling.

Good question. Let me back-track a little into the annuals of the decision 
to move the button wizard from VBA to macros. There are a significant 
percentages of Access databases that are built by information workers that 
have very little code. One of the many goals for Access 2007 was to expand on 
this and allow IWs to build better applications without writing code. The new 
security model allows users to run databases without any VBA code enabled 
(this is important for many organizations). As you know, trusted locations 
make it much easier to deploy databases with code. Our wildly popular 
templates are functional databases that don't have code. Feedback on the 
templates have been positive.

We started running into scenarios where IWs opened a database and added a 
switchboard or button that didn't work. Users were confused--they didn't work 
because the database wasn't enabled. As many of you have complained about 
over the years, the wizards also wrote out poor examples of VBA (doMenuCmd 97 
kind of stuff). To fix the problem we converted the wizards to write out 
embedded macros that run in untrusted databases. We also spent time cleaning 
up the code they generate to provide users with better learning examples.

We did consider a flag to write out either VBA or macros but the feature was 
one of many things we wanted to do that didn't make it into the release. :-(  
Beta 2 shipped and we got lots of feedback from beta testers (Pat Hartman and 
John Viescas were particularly vocal) that they wanted a way to convert 
embedded macros to VBA. As a late change we made it possible to convert 
embedded macros to VBA. You can find the command on the Database tab under 
Macro.

Do we think everything should be written in macros? No--they aren't a 
replacement for VBA. VBA will continue to ship and be supported in the 
future. Macros are turning out to be useful for simple actions that took a 
few lines of code. We find that IWs are much more successful making small 
changes to macros than VBA. I have yet to hear a perf complain on macros 
verses VBA, so performance shouldn't be an issue. Long-term, we intend to 
continue to innovate in this area and make macros more useful for broader 
developer scenarios.

Thanks for your question and hope this explains our logic.

Filed under: Developer, Templates, Access 2007

--------------------------------------

"Douglas J. Steele" wrote:

> What version of Access?
> 
> I've never seen the wizard create a macro, although I haven't used the 
> wizard in Access 2007.
> 
> -- 
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no e-mails, please!)
> 
> 
> "David Semon" <DavidSemon@discussions.microsoft.com> wrote in message 
> news:FCB60FCA-B311-446D-9F51-ED0E2ED68DB1@microsoft.com...
> >I want the control wizard to create VBA code, not embedded macros.  I 
> >checked
> > the "Always use event procedures" box in the Access Options - Object
> > Designers, but the wizard still creates embedded macros instead of VBA 
> > code
> > (tried several combo boxes and command buttons on different forms).  What 
> > am
> > I missing? 
> 
> 
> 
0
Reply Utf 11/7/2007 6:51:01 PM

On Nov 8, 7:51 am, David Semon <DavidSe...@discussions.microsoft.com>
wrote:
> Douglas:
>
> FYI: In my search for an answer (which I still do not have), I came across
> this article which explains why Access 2007 has embedded macros:
>
> -------------------------------------------
>
> Saturday, April 21, 2007 4:26 AM clintc
> Reader question about macros and VBA
> A reader recently asked:
>
> Is there any way on Access 2007 to keep wizards and Switchboard Manager
> coding in VBA, any way developers "HAVE" to code for most applications.
> If a customer is buying an apllication from us, he is not going to trust
> what he bought?.
> Switchboard manager was great in its code handling.
>
> Good question. Let me back-track a little into the annuals of the decision
> to move the button wizard from VBA to macros. There are a significant
> percentages of Access databases that are built by information workers that
> have very little code. One of the many goals for Access 2007 was to expand on
> this and allow IWs to build better applications without writing code. The new
> security model allows users to run databases without any VBA code enabled
> (this is important for many organizations). As you know, trusted locations
> make it much easier to deploy databases with code. Our wildly popular
> templates are functional databases that don't have code. Feedback on the
> templates have been positive.
>
> We started running into scenarios where IWs opened a database and added a
> switchboard or button that didn't work. Users were confused--they didn't work
> because the database wasn't enabled. As many of you have complained about
> over the years, the wizards also wrote out poor examples of VBA (doMenuCmd 97
> kind of stuff). To fix the problem we converted the wizards to write out
> embedded macros that run in untrusted databases. We also spent time cleaning
> up the code they generate to provide users with better learning examples.
>
> We did consider a flag to write out either VBA or macros but the feature was
> one of many things we wanted to do that didn't make it into the release. :-(  
> Beta 2 shipped and we got lots of feedback from beta testers (Pat Hartman and
> John Viescas were particularly vocal) that they wanted a way to convert
> embedded macros to VBA. As a late change we made it possible to convert
> embedded macros to VBA. You can find the command on the Database tab under
> Macro.
>
> Do we think everything should be written in macros? No--they aren't a
> replacement for VBA. VBA will continue to ship and be supported in the
> future. Macros are turning out to be useful for simple actions that took a
> few lines of code. We find that IWs are much more successful making small
> changes to macros than VBA. I have yet to hear a perf complain on macros
> verses VBA, so performance shouldn't be an issue. Long-term, we intend to
> continue to innovate in this area and make macros more useful for broader
> developer scenarios.
>
> Thanks for your question and hope this explains our logic.
>
> Filed under: Developer, Templates, Access 2007
>
> --------------------------------------
>
>
>
> "Douglas J. Steele" wrote:
> > What version of Access?
>
> > I've never seen the wizard create a macro, although I haven't used the
> > wizard in Access 2007.
>
> > --
> > Doug Steele, Microsoft Access MVP
> >http://I.Am/DougSteele
> > (no e-mails, please!)
>
> > "David Semon" <DavidSe...@discussions.microsoft.com> wrote in message
> >news:FCB60FCA-B311-446D-9F51-ED0E2ED68DB1@microsoft.com...
> > >I want the control wizard to create VBA code, not embedded macros.  I
> > >checked
> > > the "Always use event procedures" box in the Access Options - Object
> > > Designers, but the wizard still creates embedded macros instead of VBA
> > > code
> > > (tried several combo boxes and command buttons on different forms).  What
> > > am
> > > I missing?- Hide quoted text -
>
> - Show quoted text -

So has anyone got a solution to this yet?
0
Reply David 12/12/2007 2:00:40 AM

Not yet ... I'm still trying to figure out what is going on.  Even reloaded 
MS Office.  Still a problem.

Dave Semon

"David" wrote:

> On Nov 8, 7:51 am, David Semon <DavidSe...@discussions.microsoft.com>
> wrote:
> > Douglas:
> >
> > FYI: In my search for an answer (which I still do not have), I came across
> > this article which explains why Access 2007 has embedded macros:
> >
> > -------------------------------------------
> >
> > Saturday, April 21, 2007 4:26 AM clintc
> > Reader question about macros and VBA
> > A reader recently asked:
> >
> > Is there any way on Access 2007 to keep wizards and Switchboard Manager
> > coding in VBA, any way developers "HAVE" to code for most applications.
> > If a customer is buying an apllication from us, he is not going to trust
> > what he bought?.
> > Switchboard manager was great in its code handling.
> >
> > Good question. Let me back-track a little into the annuals of the decision
> > to move the button wizard from VBA to macros. There are a significant
> > percentages of Access databases that are built by information workers that
> > have very little code. One of the many goals for Access 2007 was to expand on
> > this and allow IWs to build better applications without writing code. The new
> > security model allows users to run databases without any VBA code enabled
> > (this is important for many organizations). As you know, trusted locations
> > make it much easier to deploy databases with code. Our wildly popular
> > templates are functional databases that don't have code. Feedback on the
> > templates have been positive.
> >
> > We started running into scenarios where IWs opened a database and added a
> > switchboard or button that didn't work. Users were confused--they didn't work
> > because the database wasn't enabled. As many of you have complained about
> > over the years, the wizards also wrote out poor examples of VBA (doMenuCmd 97
> > kind of stuff). To fix the problem we converted the wizards to write out
> > embedded macros that run in untrusted databases. We also spent time cleaning
> > up the code they generate to provide users with better learning examples.
> >
> > We did consider a flag to write out either VBA or macros but the feature was
> > one of many things we wanted to do that didn't make it into the release. :-(  
> > Beta 2 shipped and we got lots of feedback from beta testers (Pat Hartman and
> > John Viescas were particularly vocal) that they wanted a way to convert
> > embedded macros to VBA. As a late change we made it possible to convert
> > embedded macros to VBA. You can find the command on the Database tab under
> > Macro.
> >
> > Do we think everything should be written in macros? No--they aren't a
> > replacement for VBA. VBA will continue to ship and be supported in the
> > future. Macros are turning out to be useful for simple actions that took a
> > few lines of code. We find that IWs are much more successful making small
> > changes to macros than VBA. I have yet to hear a perf complain on macros
> > verses VBA, so performance shouldn't be an issue. Long-term, we intend to
> > continue to innovate in this area and make macros more useful for broader
> > developer scenarios.
> >
> > Thanks for your question and hope this explains our logic.
> >
> > Filed under: Developer, Templates, Access 2007
> >
> > --------------------------------------
> >
> >
> >
> > "Douglas J. Steele" wrote:
> > > What version of Access?
> >
> > > I've never seen the wizard create a macro, although I haven't used the
> > > wizard in Access 2007.
> >
> > > --
> > > Doug Steele, Microsoft Access MVP
> > >http://I.Am/DougSteele
> > > (no e-mails, please!)
> >
> > > "David Semon" <DavidSe...@discussions.microsoft.com> wrote in message
> > >news:FCB60FCA-B311-446D-9F51-ED0E2ED68DB1@microsoft.com...
> > > >I want the control wizard to create VBA code, not embedded macros.  I
> > > >checked
> > > > the "Always use event procedures" box in the Access Options - Object
> > > > Designers, but the wizard still creates embedded macros instead of VBA
> > > > code
> > > > (tried several combo boxes and command buttons on different forms).  What
> > > > am
> > > > I missing?- Hide quoted text -
> >
> > - Show quoted text -
> 
> So has anyone got a solution to this yet?
> 
0
Reply Utf 12/12/2007 5:33:01 AM

5 Replies
575 Views

(page loaded in 0.105 seconds)


Reply: