Solved

Turn off Macro and Use VBA

Posted on 2011-03-14
11
584 Views
Last Modified: 2013-11-27
I have always been able to force Access to use VBA instead of macro's by marking Use Event in Access Options. For some reason, in a new Access 2007 database I wrote, it does not work and still gives me Macros. I have closed and opened the data base, started new form, still get Macros

Thanks

Mike
0
Comment
Question by:Mistebar
  • 5
  • 2
  • 2
  • +2
11 Comments
 
LVL 75

Expert Comment

by:DatabaseMX (Joe Anderson - Access MVP)
Comment Utility
Do you have the property set to Yes shown in the image ?

mx
Capture1.gif
0
 
LVL 21
Comment Utility
0
 
LVL 57

Assisted Solution

by:Jim Dettman (Microsoft MVP/ EE MVE)
Jim Dettman (Microsoft MVP/ EE MVE) earned 63 total points
Comment Utility
Mike,

  Starting with A2007 and Microsoft's new focus on macros, there is no longer an option to have it create VBA instead of a macro.

  Setting the option MX mentioned above now only affects the use of the builder button (...).

  There is a macro to VBA converter button on the ribbon.

JimD.
0
 
LVL 75

Expert Comment

by:DatabaseMX (Joe Anderson - Access MVP)
Comment Utility
"there is no longer an option to have it create VBA instead of a macro."
Where or what is this ?

I'm not being forced to create Macros in any of my A2010 dbs ...

mx
0
 
LVL 57

Expert Comment

by:Jim Dettman (Microsoft MVP/ EE MVE)
Comment Utility
<<I'm not being forced to create Macros in any of my A2010 dbs ...>>

  Wizards will not generate anything but macro's...

JimD.
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 75

Expert Comment

by:DatabaseMX (Joe Anderson - Access MVP)
Comment Utility
oh.  Well, in never having used the wizards ... guess I would not notice that.

mx
0
 
LVL 74

Accepted Solution

by:
Jeffrey Coachman earned 62 total points
Comment Utility
To clarify what Jim posted...

In an Access 2007 or newer *Format* database, the wizards will only create Macros.

If you want the wizards to create VBA code, then you will have to convert the DB back to the 2002-2003 format.

However, this one benefit is, IMHO, not worth converting the format for.

Like most Experts here, I have pretty much memorized any wizard code, and can write it myself.
Remember the wizards only do fairly basic things anyway, ...so it is not that hard to use the wizards at first, then simply copy the code they create to a note pad file to use for reference.
;-)

(Also remember that Intellesense and the VBA help files are always there to help.)

;-)

JeffCoachman

0
 
LVL 75

Expert Comment

by:DatabaseMX (Joe Anderson - Access MVP)
Comment Utility
<Has anyone notice the the Expert Ranking (genius, guru, bozo, etc) is missing under the EE emoticons ?
Not sure when this started, but I just posted this on the Bug page>

mx
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
Comment Utility
Hey, I never got my Bozo shirt...
;-)
lol
0
 
LVL 75

Expert Comment

by:DatabaseMX (Joe Anderson - Access MVP)
Comment Utility
Yeah ... they were special order only !
0
 

Author Closing Comment

by:Mistebar
Comment Utility
A very thorough answer.

Thanks

Mike
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now