Control wizard creatars macro, not VBA code (1 Viewer)

marlan

Registered User.
Local time
Today, 21:42
Joined
Jan 19, 2010
Messages
409
Hi,

Iv'e just upgraded my computer, I am now running Acc 2010.

first: I still want to develope mdb files, because there still may be clients out there running 2003. Am I loosing some great feature only in newer version?

Second: I see control wizard on forms and reports creates macro. I would like it to create code, so that I can add other code to it. Is there a way to control this?

Thanks in advance!
 

CJ_London

Super Moderator
Staff member
Local time
Today, 19:42
Joined
Feb 19, 2013
Messages
16,553
Am I loosing some great feature only in newer version?
Not really, in the the ACE side of things, deleting the contents of a table is considerably quicker and it may be my imagination, but ADODB seems quicker. From the form (/my) perspective the main change is the button design.
Is there a way to control this?
yes - don't use the control wizards - if you are that experienced you don't need them anyway
 

AlexHedley

Registered User.
Local time
Today, 19:42
Joined
Aug 28, 2012
Messages
171
There is a button that converts macros to vba in the ribbon.
You could then add to that.
 

RuralGuy

AWF VIP
Local time
Today, 13:42
Joined
Jul 2, 2005
Messages
13,826
I see control wizard on forms and reports creates macro. I would like it to create code, so that I can add other code to it. Is there a way to control this?
Not true. Go to File>Options>Object Designers>Form/Report design view - and check Always use event procedures.
 

marlan

Registered User.
Local time
Today, 21:42
Joined
Jan 19, 2010
Messages
409
Thanks All of you!
There is a button that converts macros to vba in the ribbon.
You could then add to that.
Do you meen collapse all? it gives me to much local language (Hebrew in my case)... is there an other button Iv'e missed?
 

AlexHedley

Registered User.
Local time
Today, 19:42
Joined
Aug 28, 2012
Messages
171
If you open the Macro in Design View then click on Convert Macros to Visual Basic




This was just a simple Macro that opened a Form and produces the following.
Code:
 '------------------------------------------------------------
' Macro1
'
'------------------------------------------------------------
Function Macro1()
On Error GoTo Macro1_Err

    DoCmd.OpenForm "Form1", acNormal, "", "", , acNormal

Macro1_Exit:
    Exit Function

Macro1_Err:
    MsgBox Error$
    Resume Macro1_Exit

End Function
 

marlan

Registered User.
Local time
Today, 21:42
Joined
Jan 19, 2010
Messages
409
Great tool!

works only for saved macro as a DB object, not for macro genrated to a control.

But thanks, it's great!
 

RuralGuy

AWF VIP
Local time
Today, 13:42
Joined
Jul 2, 2005
Messages
13,826
Open a form and then select the Design tab and look at the far right side of that tab.
Convert Form's Macros to Visual Basic
 

Users who are viewing this thread

Top Bottom