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

Discussion in 'Microsoft Access Form Coding' started by Guest, Nov 7, 2007.

  1. Guest

    Guest Guest

    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?
     
    Guest, Nov 7, 2007
    #1
    1. Advertisements

  2. 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" <> wrote in message
    news:...
    >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?
     
    Douglas J. Steele, Nov 7, 2007
    #2
    1. Advertisements

  3. Guest

    Guest Guest

    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" <> wrote in message
    > news:...
    > >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?

    >
    >
    >
     
    Guest, Nov 7, 2007
    #3
  4. Guest

    Guest Guest

    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" <> wrote in message
    > news:...
    > >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?

    >
    >
    >
     
    Guest, Nov 7, 2007
    #4
  5. Guest

    David Guest

    On Nov 8, 7:51 am, David Semon <>
    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" <> wrote in message
    > >news:...
    > > >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?
     
    David, Dec 12, 2007
    #5
  6. Guest

    David Semon Guest

    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 <>
    > 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" <> wrote in message
    > > >news:...
    > > > >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?
    >
     
    David Semon, Dec 12, 2007
    #6
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tammy

    creating an embedded object

    Tammy, Aug 12, 2003, in forum: Microsoft Access Form Coding
    Replies:
    0
    Views:
    181
    Tammy
    Aug 12, 2003
  2. Geoff C

    Not getting transparency in an embedded GIF in an Image Control

    Geoff C, Jun 3, 2004, in forum: Microsoft Access Form Coding
    Replies:
    1
    Views:
    194
    Guest
    Jun 3, 2004
  3. Brad Pears

    Control that looks/acts like embedded spreadsheet

    Brad Pears, Jun 6, 2005, in forum: Microsoft Access Form Coding
    Replies:
    0
    Views:
    296
    Brad Pears
    Jun 6, 2005
  4. Creating a working Macros in Access

    , Apr 9, 2008, in forum: Microsoft Access Form Coding
    Replies:
    1
    Views:
    153
  5. LT

    Saving Content of Embedded Excel Control on Form

    LT, Dec 5, 2008, in forum: Microsoft Access Form Coding
    Replies:
    0
    Views:
    175
Loading...

Share This Page