473,465 Members | 1,379 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Code changes from this code to print queries necessary to print out macro definitions

In searching the web for a method to print out macro definitions, I
found this code from Allen Browne to print out query definitions. Is
there a similar way to print out macros?

Public Function ShowAllQueries()
Dim db As DAO.Database
Dim qdf As DAO.QueryDef

Set db = CurrentDb()
For Each qdf In db.QueryDefs
Debug.Print qdf.Name, qdf.SQL
Next
End Function

In other words, does DAO or some other object expose something like a
MacroDef, similar to a QueryDef?

Thank you.
Sep 2 '06 #1
2 1447
"Newbie" <Ne****@gmail.comwrote in message
<av********************************@4ax.com>:
In searching the web for a method to print out macro definitions, I
found this code from Allen Browne to print out query definitions. Is
there a similar way to print out macros?

Public Function ShowAllQueries()
Dim db As DAO.Database
Dim qdf As DAO.QueryDef

Set db = CurrentDb()
For Each qdf In db.QueryDefs
Debug.Print qdf.Name, qdf.SQL
Next
End Function

In other words, does DAO or some other object expose something like a
MacroDef, similar to a QueryDef?

Thank you.
I don't think Macros are exposed the same way. You can dump their
contents to a text file, and take it from there. Air code.

dim ao as accessobject
for each ao in currentproject.allmacros
application.saveastext acmacro, ao.name, "c:\" & ao.name & ".txt"
next ao

--
Roy-Vidar
Sep 2 '06 #2
On Sat, 02 Sep 2006 19:50:17 +0200, RoyVidar
<ro*************@yahoo.nowrote:
>"Newbie" <Ne****@gmail.comwrote in message
<av********************************@4ax.com>:
>In searching the web for a method to print out macro definitions, I
found this code from Allen Browne to print out query definitions. Is
there a similar way to print out macros?
<snip>
>In other words, does DAO or some other object expose something like a
MacroDef, similar to a QueryDef?

Thank you.

I don't think Macros are exposed the same way. You can dump their
contents to a text file, and take it from there. Air code.

dim ao as accessobject
for each ao in currentproject.allmacros
application.saveastext acmacro, ao.name, "c:\" & ao.name & ".txt"
next ao
Thank you. I will give it a try.
Sep 2 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Donald 'Paddy' McCarthy | last post by:
So, for those that don't actively not-want a Python macro facility. If we are to have it what should it do? 1) Macro definitions should allow Doc strings. 2) There should be a separate statement...
1
by: LenS | last post by:
If this is the wrong place to post this, please advise better place. Otherwise, I have created the following python program and it works. Running on XP. I think I am now at that stage of learning...
3
by: NeilAnderson | last post by:
I'm a fairly new user of access & I've never had any training, so I'm wondering if I'm doing the right thing here, or if it matter at all. I'm building a database for room booking purposes and I'm...
41
by: Matt Alanzo | last post by:
Our SOHO 2 person compay sells furniture (not programmers). In '98 we paid $,$$$ for a VBA -Access '97 accounting application, including VBA source code .... an huge investment for us then (and...
2
by: brucedodds | last post by:
This post is for senior developers. I'm an Access contractor. This morning I see a listing for a position that seems to require development of a self-modifying database. The application may need...
22
by: Liang Chen | last post by:
Is the file "bcopy.c" in the "libitery" directory the implement of the GNU C library function "bcopy"? If so, how can it run so fast?(copy-by-byte rather than copy-by-word) When I copy the code of...
38
by: venkatesh | last post by:
int *p=20; printf("%d",*p); printf("%d",p); the above code prints the output as somegarbage value //for *p(may be address 20 //for p why can you explain
5
by: Avi Kak | last post by:
Folks, Does regular expression processing in Python allow for executable code to be embedded inside a regular expression? For example, in Perl the following two statements $regex =...
2
by: neib | last post by:
Hi I am writing a tool to extract form, report, properties to a XML format for further analysis (cross referencing etc) using Python. Reports and Forms can be accessed using AllForms,...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.