473,386 Members | 1,757 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Creating a filter in one table that effects all other tables

I am very new to Access and have figured out how to create appropriate relationships between tables, but I am having trouble filtering out data from the first level table based on filters applied to the third level.

Just for clarity I will explain what I am doing. I have a database with power plants in the US in table 1, it lists their location and ID. In table 2 I have data for those power plants for each year from 09-2014. Finally, in table 3 I have unit specific data for each power plant for the given year.

I want to filter just the combined cycle units in table 3 and have that return only the appropriate plants in table 1 and 2.

I appreciate any help.
Apr 30 '15 #1
10 1381
Seth Schrock
2,965 Expert 2GB
If you have your tables related properly, then by filtering one (or more) power plant in table 1, you will only get those records that are related to that power plant in tables 2 and 3. What have you tried and what result did you get?
Apr 30 '15 #2
I have tried this, and they do not filter across tables either way. I guess my relationships are incorrect.

Currently I have table 1 ID related to a field in table two through a one-to-many type 1 relationship. Table 2 relates to table 3 in the same way (with table 2's ID to a field in table 3)
Apr 30 '15 #3
Seth Schrock
2,965 Expert 2GB
The relationships look right. How are you implementing the filter? For example, are you using a WHERE clause in a query, using a form filter, etc.
Apr 30 '15 #4
No, I am not familiar with using a WHERE clause. I simply hit the filter button on the ribbon and the pull down arrow on the column I wanted to filter.

Is there a more appropriate way I should be doing things?
Apr 30 '15 #5
Seth Schrock
2,965 Expert 2GB
If you are looking at the table when you do that, then yes, there is a better way. If you go to the Create tab on the Ribbon, select Query Wizard, select Simple Query Wizard and click OK. In the Tables/Queries drop down box, select Table1 and then select the fields that you want from that table. Then change to Table2 and do likewise and then Table3. Once you have all the fields that you want, click Finish. Now, when you filter, the related fields from Table2 and 3 will also filter.

This is probably the simplest method, but there are certainly other, more stylish ways to do it.
Apr 30 '15 #6
Unfortuneatly, this doesn't seem to be working for me. I must be missing something.

I created a query per instructions. I then opened table 1 and put a filter the plant city field. I opened table 2, 3, and the query I just created and they are returning all entries still.

Any suggestions on what I am doing wrong?
Apr 30 '15 #7
Seth Schrock
2,965 Expert 2GB
You don't need all the tables open. You just look at the query and perform the filter on the query.
Apr 30 '15 #8
I follow you now.

The problem that exists with this method is that I can't put in a filter for all combine cycle units from table 3 and have it return only the plant names in table 1 with combine cycle units. Instead it returns plant names repeated for every combine cycle unit at that plant.

I would like to try and filter table 3 for different things such as combine cycle and be able to go back to table 1 and have it show only those plants with CC.

Is this possible?
Apr 30 '15 #9
Seth Schrock
2,965 Expert 2GB
That you can't do with a plan filter, but you can using the WHERE clause on a query. Open the query in Design view. In the query properties window, make Unique Values be True. Then uncheck the checkbox under each field that you don't want to show. Then, under the field that you want to filter, type the text that you want to filter by in the Criteria line. For example, you might enter "Combine Cycle" Or "Other Thing". Notice the double quotes and the key word Or. Let me know how this works for you.
Apr 30 '15 #10
That did the trick. Thanks for all your help!
Apr 30 '15 #11

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: jonezy | last post by:
i didnt think my sql qeury was that complicated that it would crash my web app. all im trying to do is filter data between two tables. heres my query <cfquery name="GetResults"...
2
by: Geoff Jones | last post by:
Hi Is it possible to create a new table within an access database from within VB? That is, I have an access database which has several tables. I would like, from VB.NET, to create a new table...
18
by: Ken Kazinski | last post by:
Does anyone know of a good example for creating a access database and then tables within that database. All the examples I have found so far use a SQL database. Thanks, Ken
0
by: day | last post by:
Hi I designed my database in access and I use it to migrate to MYSQL. I have a problem can some on help me on how to make a master detailed table with two other tables of which their field are...
2
by: MrNobody | last post by:
I have one main table which references several other lookup tables, like think of on the main table for example a category_id column with a categories table which maps that id to a string value. ...
3
by: %NAME% | last post by:
Suppose I am an admin of a database instance. Now I need to specify that user A has the right to create tables in his own schema, but not anywhere else. In order to let user A create tables, i...
1
by: carter.cleveland | last post by:
I am trying to create a table which is a subset of two other table where those tables have the same uniquely identifying key. I am using Access 2003. The SQL statement that I am trying to use...
1
by: nspader | last post by:
I am working on a new DB for something that clearly has not been done yet. As I have been able to find nothing on it. However, I need to start from the begining and I am having trouble setting up...
2
by: adwest | last post by:
Forgive me if this is a foolish question. I "play" in Access and have only created a few rather simple relational databases. My knowledge and experience is limited. I have no formal training, just...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.