Solved

Turn off Macro and Use VBA

Posted on 2011-03-14
11
624 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

730 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