Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Access 2010 VBA - How do I turn off macros and turn on VBA

Posted on 2011-03-10
7
Medium Priority
?
612 Views
Last Modified: 2012-05-11
Hi,
See attached.

I am creating some simple forms with buttons to call other forms.

The system is creating macros when I would much prefer if it just created regular VBA.

How can I prevent it from creating macros.


Keystone-Prototype.zip
0
Comment
Question by:Patrick O'Dea
  • 3
  • 2
  • 2
7 Comments
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 35099651
file > options > object designers > form/report design
check always use event procedures
0
 

Author Comment

by:Patrick O'Dea
ID: 35099756
Thanks capricorn1,

I  have already ticked this box.  (I believe that it is ticked in the database I attached).

However, the problem persists??

Any further thoughts??
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 35099767
try to compact and repair or close db and open again.
0
NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

 
LVL 58
ID: 35100078

  With the new emphasis on macros once again, I don't think you'll find a switch to turn it off.  You can turn off the Wizard, but I don't believe there is anything to make it generate VBA code rather then a macro.

JimD.
0
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 1000 total points
ID: 35100088
<However, the problem persists??>
if you are using the wizard to create the button, then you can not turn off the creation of embedded macro.

you can, convert the macro created to vba
0
 
LVL 58

Assisted Solution

by:Jim Dettman (Microsoft MVP/ EE MVE)
Jim Dettman (Microsoft MVP/ EE MVE) earned 1000 total points
ID: 35100116

 Note that there is a "Covert Form Macro's to VBA" on the ribbion.

  However Microsoft is really trying to get people to move away from the VBA, mostly so that DB's can be published via Sharepoint.

JimD.
0
 

Author Closing Comment

by:Patrick O'Dea
ID: 35100234
Thanks all,


I "Saved As" to 2003 and the problem is gone.   Not very satisfactory though.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
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…
Suggested Courses

971 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