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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Show all records and ignore all parameters

Status
Not open for further replies.

bikerted

Technical User
Nov 7, 2003
221
GB
I have a multiple parameter query, SQL shown below, for which it would be very helpful to have an overriding option to show all records? The latter is to be activated by a command button on a continuous form on which I have multiple combo boxes searching on all the fields thereon - hence the lengthy SQL. Is there any way I can achieve this without tinkering with the SQL - bearing in mind the latter was created on the QBE grid and not by my hand!

Any assistance will be gratefully received.

Ted.
 
it would be much easier to do it the other way around...

have a query that gets all your records, and then have another query with multiple parameters which limits the results of your first query.

then all you'd have to do was to reference the different queries...

--------------------
Procrastinate Now!
 
Thanks Crowley16,

I think you're right - the SQL, which I forgot to paste in, is too involved to go into and change.

The thing I may not have clarified, is that the continuos form is based on the parameter query, so the show-all would have been more "elegantally" achieved on the same form. I guess a copy form linked to another "show-all" query would be fine, though!

Thanks for replying.

Ted.
 
Instead of a button, you could use a checkbox on the form to show all records. To modify the SQL, put parentheses around the current WHERE clause and then add "OR checkbox=True" :

Where (current conditions) Or CheckBox=True

This also works:

Where (current conditions) Or CheckBox

John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top