What are these used for?

e2cheng

Registered User.
Local time
Today, 13:58
Joined
Dec 13, 2002
Messages
72
What are macros used for??

Thanks for your patience and explanation
 
Macros, like VBA, are used to mostly for automation. For instance opening one form from another. But they can do a lot more than that.
 
Thank you for your reply, but can't you just use a

"docmd.openform "

to open a form from another??
 
If the macro is converted to VBA it will display the code it uses.
I.e. If a macro is created to open a form then the code it uses is docmd.openform anyway. A macro is just a way of doing this if you don't know how to write the code.

If you create a macro then goto
Menu - Tools->Macro->Convert Macros to Visual Basic it should clarify it for you.
 
Thank you for the reply. I understand. So a Macro is basically a function; but what makes it so special.

Thank you once again for your teaching and patience
 
Macros are basic, general, pre-defined

Macros aren't special. They are just easy to use. Macros are pre-defined VBA functions that Microsoft added to assist users in automating their DBs if a developer has no experience using VBA.
Macros include basic functions like opening forms, moving through a records, printing reports and such. Basically enough to get by, but if you want applications that are automated more sophisticatedly, you should really delve into VBA.
The control wizards that create buttons and such can do the same things as macros accomplish, but you can then physically see the coding behind the control when you use the wizards. You can get started by using the wizards to create buttons, then look at the VBA contained in the control (that's how I got started). From there you can copy, alter and use the code elsewhere in your apps.

HTH
 
Last edited:
thank you again

thank you again for your help. truly come along as someone who's helped me a long way in terms of learning aobut access.

so just to clarify. you shouldn't ever need to use macros. it's kind of like a cheat to solving your problem right? (but then again so is any language other than binary. or is even binary a cheat...) so i won't be missing much if i don't use them.
 
If it works...

Not to confuse things....

There's no sin in utilizing macros or wizards if needed. They provide the basics to getting your applications working the way you want.
However, if you can accomplish the same task(which you can) by coding in VBA, then will be on your way to a more complete understanding of your options and how to manipulate form's, controls, reports, tables and such. For instance, there's no macro to change the caption of a command button(that I know of), but search this site or Access Help and you'll find the VBA code to do so. The more experience you get w/ VBA, the less you'll use macros. In fact, I don't use them at all.

VBA gives you the sort of control to do just about anything, but it can be very trying at times.

HTMS
 

Users who are viewing this thread

Back
Top Bottom