Lawrence Barnes
asked on
List Macro Contents
Hello EE,
I need a query to list macro contents (query names, conditions, etc.) for a macro or for all macros. Is this possible using the Access system tables? If so, which?
Thank you
I need a query to list macro contents (query names, conditions, etc.) for a macro or for all macros. Is this possible using the Access system tables? If so, which?
Thank you
You can't get this directly from the system tables, other than a list of macros. The Documenter will give you what you want.
mx
mx
ASKER
Hi MX,
I've seen your posts before and respect your opinion. But :) I've got a LOT of macros with many rows in each. The output from the documenter is hard to work with. If the system tables does not support it, is there a way to read these lines and output to a text file via VBA or other means? (insert pleading look here :)
LVBarnes
I've seen your posts before and respect your opinion. But :) I've got a LOT of macros with many rows in each. The output from the documenter is hard to work with. If the system tables does not support it, is there a way to read these lines and output to a text file via VBA or other means? (insert pleading look here :)
LVBarnes
I suppose it might be possible using VBA and looping through the Macro collection and if ... all of those properties are exposed ... pulling them out. I don't have time at the moment to look into that. I admit that the Documeter is not the optimum tool for this purpose.
mx
mx
lvbarnes,
You need to be specific when you say:
"macro contents (query names, conditions, etc.) for a macro or for all macros."
This is what the documenter does.
So again, can you "specifically" state what you mean when you say that the documenter's output is:
"hard to work with"
What does this mean, "Specifically".
In other words, can you post a clear example of what you "DO" want the output to be?
Thanks
JeffCoachman
You need to be specific when you say:
"macro contents (query names, conditions, etc.) for a macro or for all macros."
This is what the documenter does.
So again, can you "specifically" state what you mean when you say that the documenter's output is:
"hard to work with"
What does this mean, "Specifically".
In other words, can you post a clear example of what you "DO" want the output to be?
Thanks
JeffCoachman
ASKER
Hello Jeff,
Specifically :) I need all of the elements for each row of a macro placed into a table or a text file so that I can place this information into another data source.
While the documenter does display this information in its own format, it is not easy to transfer this information from the Documenter output to another data source. It would be much easier if the name and parameters of each element were in a table structure or in a delimited text file.
LVBarnes
Specifically :) I need all of the elements for each row of a macro placed into a table or a text file so that I can place this information into another data source.
While the documenter does display this information in its own format, it is not easy to transfer this information from the Documenter output to another data source. It would be much easier if the name and parameters of each element were in a table structure or in a delimited text file.
LVBarnes
LVBarnes,
Thanks for the clarification.
I do not know of a way to do what you are asking.
I do know that there are other Products that will document Access databases.
MX would propably know better
The one I am familiar with is FMSinc's Total Access Analyzer.
*However*, the documentation utility only comes as one part of a larger set of tools.
And it is priced a little on the high side.
You should invesitgate one of these utilities.
I believe the Macro "Steps" are incoded into the Access files, there are (AFAIK) not accessible through any system tables.
JeffCoachman
Thanks for the clarification.
I do not know of a way to do what you are asking.
I do know that there are other Products that will document Access databases.
MX would propably know better
The one I am familiar with is FMSinc's Total Access Analyzer.
*However*, the documentation utility only comes as one part of a larger set of tools.
And it is priced a little on the high side.
You should invesitgate one of these utilities.
I believe the Macro "Steps" are incoded into the Access files, there are (AFAIK) not accessible through any system tables.
JeffCoachman
you can export a macro as a text file using VBA. The format is
(AutoExec macro)
Version =196611
ColumnsShown =2
Begin
Condition ="Date()>#6/30/2008#"
Action ="RunMacro"
Argument ="Macro2"
End
is this an acceptable format?
(AutoExec macro)
Version =196611
ColumnsShown =2
Begin
Condition ="Date()>#6/30/2008#"
Action ="RunMacro"
Argument ="Macro2"
End
is this an acceptable format?
ASKER
Hello Capricorn,
I apologize for being a noob... Is the above to setup a function or sub? I tried running from the immediate window but was missing some pieces. Where should I place this.
Thanks,
LVBarnes
I apologize for being a noob... Is the above to setup a function or sub? I tried running from the immediate window but was missing some pieces. Where should I place this.
Thanks,
LVBarnes
that is an AutoExec macro converted to text file, and i was asking if the format is acceptable ?
ASKER
TY for the clarification. Yes, I can work with this format. However for macros with multiple lines, changing to the format below would be easier (but not necessary.)
(AutoExec macro)
Version =196611
ColumnsShown =2
Begin
Condition ="Date()>#6/30/2008#", Action ="RunMacro", Argument ="Macro2"
Condition ="", Action ="OpenQuery", Argument ="qryQuery1"
Condition ="", Action ="OpenForm", Argument1 ="frmForm1", Argument2 ="Form", Argument3 ="FilterName"
End
(AutoExec macro)
Version =196611
ColumnsShown =2
Begin
Condition ="Date()>#6/30/2008#", Action ="RunMacro", Argument ="Macro2"
Condition ="", Action ="OpenQuery", Argument ="qryQuery1"
Condition ="", Action ="OpenForm", Argument1 ="frmForm1", Argument2 ="Form", Argument3 ="FilterName"
End
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you!
Good tip cap
mx