A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

getting Tags ID used in queries



 
 
Thread Tools Display Modes
  #1  
Old December 14th, 2009, 09:40 AM posted to microsoft.public.access.queries
kami
external usenet poster
 
Posts: 17
Default getting Tags ID used in queries

Hi,

I have hundreds of queries using thousand of tags recorded by the access
database.
From all these queries, I need to create a list of all the Tags used and to
know in which queries they are used and from which table they are recorded.

Right now, i am opening the SQL view of the queries and copy/paste in Excel
all the original tag names (FieldSource) together with the table (fieldTable)
where they are recording.

Is their a simpler / half-automatic method to get lists of all the Tag name?

Thank you!
  #2  
Old December 14th, 2009, 02:02 PM posted to microsoft.public.access.queries
Stefan Hoffmann
external usenet poster
 
Posts: 991
Default getting Tags ID used in queries

On 14.12.2009 10:40, Kami wrote:
Hi,

I have hundreds of queries using thousand of tags recorded by the access
database.
From all these queries, I need to create a list of all the Tags used and to
know in which queries they are used and from which table they are recorded.

Right now, i am opening the SQL view of the queries and copy/paste in Excel
all the original tag names (FieldSource) together with the table (fieldTable)
where they are recording.

Is their a simpler / half-automatic method to get lists of all the Tag name?

Use the CurrentDb.QueryDefs collection to enumerate them, e.g.

Dim qd As DAO.QueryDef

For Each qd In CurrentDbC.QueryDefs
Debug.Print qd.Name; qd.SQL
' qd.Open
' enum qd.Fields for field names.
' qd.Close
Next qd


mfG
-- stefan --
  #3  
Old December 14th, 2009, 02:03 PM posted to microsoft.public.access.queries
John Spencer
external usenet poster
 
Posts: 7,815
Default getting Tags ID used in queries

I have never heard of tags associated with a query? Do you mean fields?

If so, you can use VBA to loop through all the queries and get a list of the
fields that are returned. You would still have problems with nested queries,
subqueries, and fields used in joins or the where clause. I'm not sure what
crosstab queries would show.

If you alias a field you will get that name returned for the field's name
property.

You would probably need a commercial tool of some kind to really get good results.

Products to document the database and do a global find and replace. All have
Access 97 and later versions. Some don't have an Access 2003/2007 version,
but may still work with Access 2003/2007.

Shareware (Try and Buy):
Find and Replace http://www.rickworld.com

Commercial (Try and Buy)
Speed Ferret http://www.moshannon.com

Commercial
Total Access Analyzer http://www.fmsinc.com

Free (For Access XP Only??):
http://www3.bc.sympatico.ca/starthere/findandreplace


Find & Replace: http://www.rickworld.com/products.html
Speed Ferret: http://www.moshannon.com/speedferret.html
Ucora: http://www3.bc.sympatico.ca/starthere/findandreplace/ (Free)
V-Tools: http://www.skrol29.com/us/vtools.php (Free)

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County

Kami wrote:
Hi,

I have hundreds of queries using thousand of tags recorded by the access
database.
From all these queries, I need to create a list of all the Tags used and to
know in which queries they are used and from which table they are recorded.

Right now, i am opening the SQL view of the queries and copy/paste in Excel
all the original tag names (FieldSource) together with the table (fieldTable)
where they are recording.

Is their a simpler / half-automatic method to get lists of all the Tag name?

Thank you!

  #4  
Old December 15th, 2009, 02:38 PM posted to microsoft.public.access.queries
kami
external usenet poster
 
Posts: 17
Default getting Tags ID used in queries

Hi,
Thanks for your answer.
Your code is not working, "enum qd.Fields " gives an error.
Kami

"Stefan Hoffmann" wrote:

On 14.12.2009 10:40, Kami wrote:
Hi,

I have hundreds of queries using thousand of tags recorded by the access
database.
From all these queries, I need to create a list of all the Tags used and to
know in which queries they are used and from which table they are recorded.

Right now, i am opening the SQL view of the queries and copy/paste in Excel
all the original tag names (FieldSource) together with the table (fieldTable)
where they are recording.

Is their a simpler / half-automatic method to get lists of all the Tag name?

Use the CurrentDb.QueryDefs collection to enumerate them, e.g.

Dim qd As DAO.QueryDef

For Each qd In CurrentDbC.QueryDefs
Debug.Print qd.Name; qd.SQL
' qd.Open
' enum qd.Fields for field names.
' qd.Close
Next qd


mfG
-- stefan --
.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:35 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.