MULTIPLE FILTERS

I have a table and I would like to filter all records that meet a certain criteria.  Can some one take a look at what I have and tell me the best way to do this.  I made 2 querys and I would like them to run at the same time but I do not know how.   I might just completely be going about this the wrong way.  

thankyou
-GilAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jmoss111Commented:
You would normally attach a file to look at,

regards,

jim
0
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
Jim ... and I thought you were a visionary ?

mx
0
jmoss111Commented:
just ask my wife...
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

-GilAuthor Commented:
wow thought i had
EE11111111.mdb
0
-GilAuthor Commented:
query one pulls all that have an NA
query 2 pull any that have a  P or F
0
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
What is wrong with what you have?

You cannot run them exactly at the same time.  

mx
0
-GilAuthor Commented:
can I do something else to make it run all at one time?  i created this becasue the idea is similar to  a database im creating(I cant post it).   But I would need to run about 4 querys to get all the records I need.
0
jmoss111Commented:
it looks like Joe isn't going to graduate...

like mx said they will have to run serially
0
jmoss111Commented:
You could do a join and they would return the results at the same time but since there is no update involved what difference does it make?
0
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
"it looks like Joe isn't going to graduate..."

huh ??

I already have an MSEE !
0
jmoss111Commented:
I think that the question needs a bit more substance.
0
jmoss111Commented:
His Joe, not you mx
0
ragoranCommented:
If the queries returns the same column (too lazy to open the file),  you can Union them...
0
-GilAuthor Commented:
Sorry im new to access what do you mean by no update
0
jmoss111Commented:
The source data remains the same for both queries so noting would change if they ran serially, or with using a join or a union as ragoran suggests.
0
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
Too many Joe's ... Joe Blow, Joe Mama, Hey Joe, Go Joe, Cup of Joe ... dang !!

Gil (Grissom?) ... what exactly are you trying to accomplish.  Keep in mind the JM lives in a DOD town!

mx
0
jmoss111Commented:
Update means that neither query changes the source table so the results would be the same if they ran serially
0
jmoss111Commented:
mx, keep in mind that my DoD town packs a wallop!
0
jmoss111Commented:
Forgive us, Gil... it's Friday
0
-GilAuthor Commented:
I see.  Well what you dorecomend I do.  If you wanted to pull all these records at once because these would be the records with mistakes on them and needed tp  correct them.    Should I use a union after all?
0
-GilAuthor Commented:
lol yeah I understand usually im gone by know but I woke up late :(
0
ragoranCommented:
Make sure but queries are selecting the column in the same sequence (Student, Semester, Math, ...)

Remove the condition on Student from both queries.

Create this new query:

SELECT * from query1
union  
select * from query2
where student = [Type JOE]
0
jmoss111Commented:
Union would probably be the best bet.
0
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
Man, I don't know about unions ... look at the auto industry!!!

jm ... it's NASCAR weekend here in CA ... you're gonna have to take over ... I will be at the track Sat/Sun.

mx
0
jmoss111Commented:
I was thinking about calling in an air strike on Rancho Cucamonga on Sunday, stay low things may get out of hand.
0
-GilAuthor Commented:
ragoran,
Can you be a little clearer I know its really simple but I have never done one before.
Thankyou
0
ragoranCommented:
1- When creating union, it is simpler to create the basic queries as you did (Query1 and query2).  However, it is best if the queries return the same columns in the same sequence.

So both queries should start with:

SELECT STUDENT, SEMESTER, MATHCLASS, READINGCLASS, SPEACHCLASS, ENGLISHCLASS FROM Table1


2- because you are running the queries together, it is easier to have only one question for the condition (Type JOE), so I removed them from query1 and 2.

3- You can't create a Union query using the query tools, you need to type it in the SQL pane:
   - create a new query in design view
   - close the "Select table" dialog
   - in the View menu, select SQL Mode
   - copy-paste the query above.


0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ragoranCommented:
Need to go for an appointment. I will login in 4-5 hours from now.

Jim / mx, don't hesitate to jump back in to help Gil  -- thanks
0
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
Well, jim is kinda busy setting up that air strike!  But Jim ... no need, because usually they have a Stealth fighter fly over just as the SSB ends.  

mx
0
jmoss111Commented:
Have a nice weekend at the races mx.
0
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
thx Jim ... and you have a big one down in dod land too!

Hey ... I have to head to a meeting ... finish this off and you get the pts ...

mx
0
-GilAuthor Commented:
I did some searching online and saw that "UNION ALL" was used so I used this but I would now like to take away one of the message boxes that ask to "enter joe"   the student name.  I tried deleteing it from the second QUERY but have not got successful results.

-gil
EE222222222.mdb
0
-GilAuthor Commented:
thankyou for helping me learn how to make a union
0
ragoranCommented:
If you don't want to be asked "Enter Joe", you must remove all conditions on the field Student in Query 4.  Query4 will then return all records that match criteria.

To filter the result, create a new query:

select * from query4 where student="Joe"

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.