Query question . Join 200 together .

Sunline

Well-known Member
Joined
Oct 6, 2007
Messages
701
Office Version
  1. 2016
Platform
  1. Windows
Hello all , im using Access version 2003 , still a learner .
Im wanting some advise on a quicker way to write very basic code when i write a query in advanced filter sort .
I have approx 200 to put in and i know from previous experience that i will run out of lines when i enter going thru Records , filter , advanced filter sort .
In the query table where they all are im unsure how to join these all together or link them to all run on one table only .
Im not linking tables or anything , just all in one table .
Could you point me in the right direction on how to get all these too work in one go .
Thanks .
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
What do you mean "...approx 200 to put in?"

I'm not understanding exactly what you are trying to do and what you mean by "an advanced filter sort." How are you building this query and are you doing it in Access or in Excel?
 
Upvote 0
Definately Access 2003 , i have a basic table , i only know how to write a query going too on the top menu bar .
Records , filter , advanced filter sort , i then write the query in here and save it .
Then i go to Queries from Tables , i have 200 approx queries written and saved .

I would like to join these so all will open in the one table instead of indivdually .

I dont know what the correct term is too join all 200 together too have them all return results combined .

Is it a union , append , join , inner , outer . at least if i knew what it was i could start to learn how to do this .
Thanks .
 
Upvote 0
What are some sample "queries" that you've written - let's say, three of them, and how would you like to see them all together at once?
 
Upvote 0
200 queries written? Wow, that is a lot of queries. And no, there is no real way to put them all together at once. But the big question would be - what are they and is there a better way to do what you are trying to do, but you don't know how to do, given your limited knowledge. We might be able to help with that but joining 200 queries together for one output - isn't going to happen.
 
Upvote 0
Ok thanks guys , my table is called PIX ONE ONLY , some query examples in first sheet .

The second sheet is what my table looks like .

Each row represents one query only .

I would like to add alot more and return results once these queries have done there filtering etc . Expected results would return what has been selected by my queries .

Thanks .
 
Upvote 0
sorry attachments didnt go in .
Excel Workbook
ABCDEFGHIJKLMNOPQRSTUVWX
1PQYeaMonDateDayWinPlaceClassStakesR#FszPlacingPonRnoRfavHorseAppPQ3PQ2PQ1App3App2App1Nztr%
2is null183PQis null
3MDN181V21is nullA
4181Ais null>0 and
5SaturdayOPN HCP250is nullPQPQis null
6PQ>49999200>1 andis nullis nullAA>85
Sheet1


Excel Workbook
ABCDEFGHIJKLMNOPQRSTUVWXY
1ID1PQYeaMonDateDayWinPlaceClassStakesR#FszPlacingPonRnoRfavHorseAppPQ3PQ2PQ1App3App2App1Nztr%
2141402011Aug05-Aug-11FridayRating 70 SW+P$13,000.00611319753ThornbirdsPQPQAAA44
3141412011Aug05-Aug-11FridayRating 80$13,000.007101019134Govind45
4141422011Aug05-Aug-11FridayMDN$10,000.00812224011Whistling StraitsAA71
5141432011Aug06-Aug-11SaturdayRating 70 SW+P$13,000.0016521631AbbottabadAPQAA50
6141442011Aug06-Aug-11SaturdayRating 80$13,000.0026518712CosabellaPQPQA50
7141452011Aug06-Aug-11SaturdayOPN HCP$20,000.0036517721Hurricane MickeyPQPQA57
8141462011Aug06-Aug-11SaturdayRating 90$15,000.0046516833BindiPQPQ40
9141472011Aug06-Aug-11SaturdayRating 70 SW+P$13,000.00516820247AlderneyA20
10141482011Aug06-Aug-11SaturdayMDN$10,000.00611627691RunningdownadreamAA60
11141492011Aug06-Aug-11SaturdayRating 70 SW+P$13,000.00710120941Master MichaelPQ29
1214150PQ2011Aug06-Aug-11SaturdayOPN HDL$30,000.00115620324HoneyPQ40
1314151PQ2011Aug06-Aug-11Saturday3YO HCP$15,000.00210823614Venetian RaiderAA55
1414152PQ2011Aug06-Aug-11SaturdayRating 85$25,000.0037321966SherborneA20
1514153PQ2011Aug06-Aug-11SaturdayRating 90$30,000.0049925524Keep The ConflictAAA58
Sheet1
 
Upvote 0
I still don't understand why you have 200 queries to get this data. From the look of your screenshots it looks like you might be overcomplicating things. Can you, as was asked by xenou already, post the SQL for several of the queries so we can see what they look like? If you aren't sure how to post the SQL, just go into the query into design view and then on the Ribbon, go to the View tab and then select SQL View. Copy and paste that here.
 
Upvote 0
It sounds like each query is just the entire table with a filter criterion. What is it that you are filtering on?

More "normal" would be a single form, with a combobox or listbox to select the criterion of interest - thus one form takes the place of all 200 of your queries. Using a multiselect listbox, you could also select one, several, or all of the records you want to see results for.
 
Upvote 0

Forum statistics

Threads
1,224,579
Messages
6,179,656
Members
452,934
Latest member
mm1t1

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top