Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I Add All toList and have this Query work

Status
Not open for further replies.

Tmat

Technical User
Jul 22, 2000
27
US
I have a form with a list box and you chose a class from the list it populates text boxes that feeds two queries there parameters. Q1-non preferences and Q2-qualifications then I run another query to find unmatched professors between the two this tells me who can teach the class. My dilemma is I will have 20 to 80 classes to fill and I want to choose between selecting one class at a time or all at once to run a report. I tried following Northwind All example, I didnt get it to work human error. so I am not sure if this is possible the way I have it set up or does it require some form of SQL. I have tried a few variations but no luck? Any help would be appreciated.
Thanks
Tmat
 
Tmat:

Here's the text from MS Access Help (response to search question "Return all Records from Parameter Query")

Here's a tip the text below doesn't supply: If you have more than one parameter you need to put every paramter text (the text between '['s) a second time in the "or" level of the query designer, regardless of whether you want to return all records for that particular parameter in the absence of a parameter entry. You won't add the "Is Null" qualifier after the parameter text for those parameters for which you don't want an all records default.

I just recently couldn't figure out why a One or All query of mine wouldn't work and found this by T&E. I looked at the SQL for this and there was no logical reason for it.

Hope this helps,

Jeff

Help Article:

I want the option of returning all records with a parameter query.


In the design grid under the field that contains the prompt in the Criteria cell, type [prompt] Is Null in the Or cell, where prompt is the same prompt that is in the Criteria cell for that field. For example, in the CategoryID field:

In this cell Type
Criteria Like [Enter Category ID:]
Or [Enter Category ID:] Is Null


Now when you run the query, if you leave the Enter Parameter Value dialog box blank, the query returns all records.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top