473,581 Members | 2,789 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

list criteria fields of query

I used the code here:

http://groups.google.com/group/comp....18febe2ab9eda5

to list in all my queries their tables and fields.

Now I'd like to view their criteria for each field as well. Where is
this information located? How do I access it?

Thanks in advance,

Christian

Sep 13 '07 #1
1 1420
On Thu, 13 Sep 2007 10:00:07 -0700, ch************@ yahoo.com wrote:
I used the code here:

http://groups.google.com/group/comp....18febe2ab9eda5

to list in all my queries their tables and fields.

Now I'd like to view their criteria for each field as well. Where is
this information located? How do I access it?

Thanks in advance,

Christian
You could cycle through the queries, then examine it's SQL.
The criteria (if there is any) is the text that follows the word
Where.
Public Sub ShowCriteria()

' Show each Query's SQL
Dim Db As Database
Dim qry As QueryDef
Set Db = CurrentDb

For Each qry In Db.QueryDefs
Debug.Print "Query Name = " & qry.Name
Debug.Print "SQL = " & qry.SQL
Debug.Print "*****"
Next qry
Set Db = Nothing
End Sub
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Sep 13 '07 #2

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

Similar topics

5
2248
by: chris vettese | last post by:
I have a table called table1 that has a one to many relationship to table2. What I would like to do is have a form with two list boxes on it. The first list box will have a field from all of the records in table1. When the user clicks on one of the records, the second list box will show all of the records related to that from table2. Is...
5
1916
by: Jonny | last post by:
Hello, I have a List Box in my DB on a form, which when the form is opened, the list box displays the date relating to the records. (Date, Person etc) How can I get it so that when I open the form, ONLY the records with a date within the current month are shown. Thanks in advance.
2
2529
by: Matthew | last post by:
Hey , I have built a query which takes values from unbounded fields on a form, and it all works except for one thing. I have a few fields in my query that are dates. I also have a start and end date and time on my form. So, a user will specify the start and end date, and also, the user has the option of checking which of the time fields...
0
3493
by: starace | last post by:
I have designed a form that has 5 different list boxes where the selections within each are used as criteria in building a dynamic query. Some boxes are set for multiple selections but these list boxes do not necessarily need to have a selection made to be used in the dynamic query. In essence the form can have selections made in all or...
5
2586
by: Rolan | last post by:
I have tried many iterations of constructing an expanded string link criteria for a list box selection, but have not been successful. The List Box uses a Totals Select Query that has a CustID, Customer Name, Invoice Date and Invoice Amount. There is no InvoiceID/number, otherwise it would be easy to resolve. Currently, I must use a...
0
2458
by: Greg Strong | last post by:
Hello All, In the past I've used a combo box with the 'row source' being an Access SQL union query to select "All" or 1 for only 1 criteria in a query. An example is as follows: SELECT 0 As PvdrID, "All" As PvdrDesc FROM tblPrvdr UNION SELECT PvdrID, PvdrDesc FROM tblPrvdr ORDER BY PvdrID; In the query I would place a field which...
4
3489
by: justin tyme | last post by:
Hello Experts! I would like to combine (which may not be the correct technical term) two text fields from the same table in a query. Specifically, text field A and text field B are both lists of names. My goal is to have one long list of all the names, not A next to B like one gets when you use the & operator. The eventual goal is to be...
3
361
by: Propoflady | last post by:
Hi I have a table that has these two fields, company, lastname. I want to create a query that when I type in the characters will return all the values in the company and last name field that match. So for example, I have John Brown, and Brown Construction, two seperate contact entities. When I go to my combo box and type in Brow i...
0
7882
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8312
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7914
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8181
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
3809
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3835
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2309
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 we have to send another system
1
1410
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1145
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.