Solved

Turn off Macro and Use VBA

Posted on 2011-03-14
11
607 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
ID: 35132135
Do you have the property set to Yes shown in the image ?

mx
Capture1.gif
0
 
LVL 21
ID: 35132195
0
 
LVL 57

Assisted Solution

by:Jim Dettman (Microsoft MVP/ EE MVE)
Jim Dettman (Microsoft MVP/ EE MVE) earned 63 total points
ID: 35132218
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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
LVL 75
ID: 35132258
"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
ID: 35132323
<<I'm not being forced to create Macros in any of my A2010 dbs ...>>

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

JimD.
0
 
LVL 75
ID: 35132397
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
ID: 35132587
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
ID: 35132625
<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
ID: 35132705
Hey, I never got my Bozo shirt...
;-)
lol
0
 
LVL 75
ID: 35132738
Yeah ... they were special order only !
0
 

Author Closing Comment

by:Mistebar
ID: 35132768
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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
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.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

816 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

13 Experts available now in Live!

Get 1:1 Help Now