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!

Modifying a Query 1

Status
Not open for further replies.

4808

Programmer
Jan 13, 2004
27
GB

Hello,
I am trying to do a query from two tables; in one of the tables I have two columns that are yes or no selections. On my form I have two check boxes corresponding to the two columns so the use user can select one or the other. Now using the query wizard I did a query based on one selection but the result shows all the records in the table. How do I modify the query to show only those selected?
Can some one help please?
thanks in advance
 
Open the query in Design View.

What you write depends on whether you want to see records with a specific check box ticked, both ticked, or either ticked. Assuming the check box fields are called Check1 and Check2:

To display only records where Check1 is ticked, write True on the 'Criteria' line for this field. Similarly for 'Check2' only.

To display records where both Check1 and Check2 are ticked, write True on the same 'Criteria' line for both fields.

To display records where either Check1 or Check2 are ticked, write True on different 'Criteria' lines.

Similarly, to display records where Check1 is not ticked, write False on the 'Criteria' line for this field.

Finally, note that you can use 'Yes' instead of 'True' and 'No' instead of 'False', but True and False are more standard terms.

I hope that this helps.


Bob Stubbs
 
Hi Bob,
thank you for the valueable post, i have another request, i dont want users to have access to the Access objects menu, you know where you have the forms, reports,queries, macros,etc. I want some standard queries & reports on a form any ideas how i can do that?

Many thanks in advance
Alpha
 
I am writing an FAQ about this ... in my database I have a 'reports and queries selection' form, on which a user can choose and run a query or report from a drop-down list of friendly report names.

This form also allows the user to pass a parameter to a report, e.g. an Employee ID number, if required.

I'll update you when the FAQ is ready ... hopefully it will give you some useful ideas.



Bob Stubbs
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top