View Full Version : More help needed
lindsayj62
6th March 2003, 09:09.26 AM
Let me first say, I'm so thankful for the help I've received from everyone in the past. I have another question about how do something in Access. I'm using Access XP. Let's say I run a query that finds all races where the ML favorite is 3/1 or more. Now, how do I then run a 2nd query against only the races that the first query found? This 2nd query would be unrelated to first query as far as what it's filtering for. I would just like to be able to pull those races out the DB that fit the ML Favorite over 3/1, and then run other queries against that data.
Any suggestions would be appreciates. Thanks again.
Jay
Donnie
6th March 2003, 10:09.01 AM
Save the query, then run a new query based on the first query...when first designing a query you can choose whether you want the new query based on a table, or a query....change to the query tab and choose the name of your first query! Be sure to add all the fields you will need in the second query into the first query at the start!
Rick
6th March 2003, 10:13.14 AM
Tis easy.
Open Access. Open database. Click on Queries. Click on New. Design View, Click on OK.
In the Show Table that pops up select Queries, double click on your first query (or highlight it and click Add), then Click on Close.
You might have to add more fields to your first query if you didn't include them all to begin with.
lindsayj62
6th March 2003, 10:26.12 AM
Thanks for your advice. I followed your instructions, but I'm not sure if this is going to solve this problem.
I create a query that finds all ML Favorites >=3/1. I save this query.
I design a new query and choose the first query, then add additional fields as needed. Now when I run this query, aren't I only going to get ML Favorites >=3/1 plus whatever I filtered for?
This is not what I'm looking for. What I'm looking for is to pull out my DB races that had a ML Favorite >=3/1. Then I would like to query those races for additional filters. I don't want to query the ML Favorites themselves, I only want to query the races they were in. Does this make sense?
hurrikane
6th March 2003, 10:35.54 AM
Linsay,
the first query you ran filtered out everything that is >=3-1 so everything you filter on after that is only on the data that is 3-1 or greater.
Not sure how large your database is but you may find it easier to make a table using the make table query and create a table of all the >=3-1 horses and query on that. Will process faster but if your db isn't that big(I mean a year or more) then don't worry about it..use the 2 query method.
MikeDee
6th March 2003, 10:42.59 AM
maybe this is what you want to do
I have made a spredsheet with instructions
hope the pictures come through
we will see?
take alook at the attched
lindsayj62
6th March 2003, 11:53.18 AM
Mike.
Thanks so much. That is exactly what I'm looking for. I want to run queries only on the races where the ML Fav is >=3. I don't want to run them on the horse itself, but on the races that have this type of favorite.
Looking at your Spreadsheet. I understand everything except for the linking of the Date, Track and Race from the first query to the Table. How do I link them. I have them both showing in my new query, but I'm not sure how to do the link.
Thanks
MikeDee
6th March 2003, 12:02.48 PM
to link
put your cursor on the date left click and drag over to date on the query and release this will put a connecting line between date in hx4 and date in the query.
now repeat this for track and race.
when done you have linked these 3 items and only the races that are in both the table and the query will appear in your query
lindsayj62
6th March 2003, 01:31.38 PM
Thanks again Mike. I'm always amazed how quickly my questions are answered on this board. It's very much appreciated. I was able to get the data for the query I wanted in just minutes as opposed to several hours if I had done it without linking the query.
MikeDee
6th March 2003, 02:15.37 PM
No problem Jay.
The technique of summing to get a set of races and then linking it back to a table for race analysis, can be pretty handy.
I won't embarrass myself by telling how long it took to figure out how to do it, no sense having everyone invent the wheel.
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.