[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

How to create a query to select like things/

Posted on 2011-09-21
2
Medium Priority
?
245 Views
Last Modified: 2012-05-12
Attached is a query that selects the same color cars from two tables. What I am trying to do is change slightly. I want to use checkboxes (yes/No) for the three color cars (Red, Blue and Green) in each table. So, if a user selects (checks) red from table 1 and Red from table two, the query brings up theses similar choices.
SelectTest-9-21-2011.mdb
0
Comment
Question by:cssc1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 26

Accepted Solution

by:
Nick67 earned 2000 total points
ID: 36577576
That's a very rough sample.
It almost seems like homework--which Experts are not permitted to complete
What you are looking for is a parameterized union query

select * from LotCars1 where iif(forms!someform!chkRed1=true,carcolor="red",1=2)

Union ALL

select * from LotCars1 where iif(forms!someform!chkBlue1=true,carcolor="Blue",1=2)

Union ALL

select * from LotCars1 where iif(forms!someform!chkGreen1=true,carcolor="Green",1=2)

Union ALL

select * from LotCars2 where iif(forms!someform!chkRed2=true,carcolor="red",1=2)

Union ALL

select * from LotCars2 where iif(forms!someform!chkBlue2=true,carcolor="Blue",1=2)

Union ALL

select * from LotCars2 where iif(forms!someform!chkGreen2=true,carcolor="Green",1=2)


See someform and Query1 on your returned sample
SelectTest-9-21-2011.mdb
0
 

Author Closing Comment

by:cssc1
ID: 36581637
Nick67
Thanks for all your help!
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question