Selecting one parameter or ALL

Dave 350z

Registered User.
Local time
Today, 18:54
Joined
Dec 6, 2011
Messages
12
Hi folks,
This might be a simple enough one (I hope), but I have a listing of offices, I want the query to enable me to input the office name (I can do this no problem), but I also want the option to be able to select ALL offices.

Is this possible?

thanks
Dave
 
If you are collecting your criteria from a form you could use the following scheme;
Code:
Like [URL="http://www.techonthenet.com/access/functions/advanced/nz.php"]Nz[/URL]([Forms]![YourFormName]![YourTextBoxName],"*")
 
I haven't advanced it to a form as yet, it's merely a select query at the moment.

I have a number of parameters in the query, so I can select the query by a single office, but I need to be able to show it not only by one office, but by all items or effectively no selection if you get me?
 
Text - so for example, I have say three offices, Cashel, Dublin, Portlaoise. I have a parameter [Enter Office] and then just type in one of the office names, which is fine, it will show me the required details for that office, but I want to be able to run the same query and show ALL offices rather than just one office and obviously I don't want to have to go into the query each time to change it.

I have a feeling you're going to suggest a form is the easiest way of doing it! ;)
 
You can use the same scheme I demonstrated in my first post simply use;
Code:
Like Nz([Enter Office],"*")

This is not an ideal situation though. If you fire the query from a form you have far more control over how your user interacts with your DB.

As a quick run down; Tables are where your data is stored and your user should have no direct access to the tables. Forms allow you to control how your user views and interact with the data stored in your tables. All user interaction with the underlying data should take place through the "filter" of a form. Queries allow you to manipulate the data so it can be displayed in forms or Reports. Reports allow your user to create a hard copy representation of the data.
 

Users who are viewing this thread

Back
Top Bottom