469,347 Members | 1,874 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,347 developers. It's quick & easy.

What are macros in A2003?

If I click on the Macros button in the database window there is 1 macro
that exists...AutoExec.

If I click on the Modules button and enter the VB Editor window there's
the menu option Tools. Clicking on that there's the menu pad Macros...

If I click on that pad, a window pops up with the caption "Macros".

Inside is a list of "macros". I click on Edit and in a cursory review
see that the majority are routines that start with the word Sub. Ex:
Sub Test()

However, there are some that start with the word Public. Ex:
Public Test()

Why does Access 2003 consider the routines in the list "macros"? If
they all began with the word "Sub" then it would make sense but since
there are some with "Public" I lost track of the commonality that may
make Access assume they are macros.

Can you clarify this for me?
Quixote's Windmills
http://www.youtube.com/watch?v=Bc6iOt-LZic


Nov 2 '07 #1
5 1306
On Fri, 02 Nov 2007 14:33:39 -0700, Salad <oi*@vinegar.comwrote:

Public is a scope modifier that is immaterial to your inquiry.
-Tom.

>If I click on the Macros button in the database window there is 1 macro
that exists...AutoExec.

If I click on the Modules button and enter the VB Editor window there's
the menu option Tools. Clicking on that there's the menu pad Macros...

If I click on that pad, a window pops up with the caption "Macros".

Inside is a list of "macros". I click on Edit and in a cursory review
see that the majority are routines that start with the word Sub. Ex:
Sub Test()

However, there are some that start with the word Public. Ex:
Public Test()

Why does Access 2003 consider the routines in the list "macros"? If
they all began with the word "Sub" then it would make sense but since
there are some with "Public" I lost track of the commonality that may
make Access assume they are macros.

Can you clarify this for me?
Quixote's Windmills
http://www.youtube.com/watch?v=Bc6iOt-LZic

Nov 3 '07 #2
Tom van Stiphout wrote:
On Fri, 02 Nov 2007 14:33:39 -0700, Salad <oi*@vinegar.comwrote:

Public is a scope modifier that is immaterial to your inquiry.
-Tom.
I don't understand why Access, in that list, attributes the subroutines
as macros. Since they aren't listed as macros in the database window it
seemed odd to see them in a list when I open up the VB Editor window.
Maybe macros mean one thing in the database and another in VB.

>
>>If I click on the Macros button in the database window there is 1 macro
that exists...AutoExec.

If I click on the Modules button and enter the VB Editor window there's
the menu option Tools. Clicking on that there's the menu pad Macros...

If I click on that pad, a window pops up with the caption "Macros".

Inside is a list of "macros". I click on Edit and in a cursory review
see that the majority are routines that start with the word Sub. Ex:
Sub Test()

However, there are some that start with the word Public. Ex:
Public Test()

Why does Access 2003 consider the routines in the list "macros"? If
they all began with the word "Sub" then it would make sense but since
there are some with "Public" I lost track of the commonality that may
make Access assume they are macros.

Can you clarify this for me?
Quixote's Windmills
http://www.youtube.com/watch?v=Bc6iOt-LZic

Nov 3 '07 #3
On Sat, 03 Nov 2007 07:38:31 -0700, Salad <oi*@vinegar.comwrote:

I agree it is inconsistent.
-Tom.

>Tom van Stiphout wrote:
>On Fri, 02 Nov 2007 14:33:39 -0700, Salad <oi*@vinegar.comwrote:

Public is a scope modifier that is immaterial to your inquiry.
-Tom.

I don't understand why Access, in that list, attributes the subroutines
as macros. Since they aren't listed as macros in the database window it
seemed odd to see them in a list when I open up the VB Editor window.
Maybe macros mean one thing in the database and another in VB.

>>
>>>If I click on the Macros button in the database window there is 1 macro
that exists...AutoExec.

If I click on the Modules button and enter the VB Editor window there's
the menu option Tools. Clicking on that there's the menu pad Macros...

If I click on that pad, a window pops up with the caption "Macros".

Inside is a list of "macros". I click on Edit and in a cursory review
see that the majority are routines that start with the word Sub. Ex:
Sub Test()

However, there are some that start with the word Public. Ex:
Public Test()

Why does Access 2003 consider the routines in the list "macros"? If
they all began with the word "Sub" then it would make sense but since
there are some with "Public" I lost track of the commonality that may
make Access assume they are macros.

Can you clarify this for me?
Quixote's Windmills
http://www.youtube.com/watch?v=Bc6iOt-LZic

Nov 3 '07 #4
"Salad" <oi*@vinegar.comwrote
... (in) the VB Editor window there's the menu option
Tools. Clicking on that there's the menu pad Macros...

If I click on that pad, a window pops up with the caption
"Macros".
Two very-knowledgeable Access MVPs, A. D. Tejpal and Tom Wickerath, have
looked at this in depth. It appears that the window/dialog box you see is
the same one that appears when you press Alt + F8 in Excel, and my guess is
that Microsoft just didn't think it worthwhile to code an exception in the
common IDE for Access... in Word and Excel, VBA was intended to replace the
product-specific macros; in Access, VBA and macros have more-or-less-happily
co-existed side by side all along.

There are a number of combinations and permutations of procedure properties,
and the only procedures that show up in the macro box are (1) Subs (which do
not return a value as Functions can, but not necessarily do), (2) typecast
as Public or not typecast which defaults to Public, (3) which do not accept
parameters.

My thanks to A. D. and Tom for sharing their knowledge on this issue -- they
had both certainly investigated it to a much greater depth than I had.

And, I will add my personal comment: the Tools | Macro dialog box / window
in Access does not appear to me to be useful. I'll continue to ignore it
unless someone is able to point out to me how it enables me to do something
I can't now do, or how it enables me to do something easier.

Larry Linson
Microsoft Access MVP
Nov 3 '07 #5
Larry Linson wrote:
"Salad" <oi*@vinegar.comwrote
... (in) the VB Editor window there's the menu option
Tools. Clicking on that there's the menu pad Macros...
>
If I click on that pad, a window pops up with the caption
"Macros".

Two very-knowledgeable Access MVPs, A. D. Tejpal and Tom Wickerath, have
looked at this in depth. It appears that the window/dialog box you see is
the same one that appears when you press Alt + F8 in Excel, and my guess is
that Microsoft just didn't think it worthwhile to code an exception in the
common IDE for Access... in Word and Excel, VBA was intended to replace the
product-specific macros; in Access, VBA and macros have more-or-less-happily
co-existed side by side all along.

There are a number of combinations and permutations of procedure properties,
and the only procedures that show up in the macro box are (1) Subs (which do
not return a value as Functions can, but not necessarily do), (2) typecast
as Public or not typecast which defaults to Public, (3) which do not accept
parameters.

My thanks to A. D. and Tom for sharing their knowledge on this issue -- they
had both certainly investigated it to a much greater depth than I had.

And, I will add my personal comment: the Tools | Macro dialog box / window
in Access does not appear to me to be useful. I'll continue to ignore it
unless someone is able to point out to me how it enables me to do something
I can't now do, or how it enables me to do something easier.

Larry Linson
Microsoft Access MVP

Thanks for satisfying my curiousity.
Nov 3 '07 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

220 posts views Thread by Brandon J. Van Every | last post: by
4 posts views Thread by Dave G | last post: by
2 posts views Thread by Earl Anderson | last post: by
1 post views Thread by Fred Zuckerman | last post: by
4 posts views Thread by Salad | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.