473,770 Members | 4,419 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Query Join Properties

5 New Member
Query Join Properties

I have 2 tables. one (Data_Participa nt) has all of the data on individual participants. the other (Data_Main) has the data of how they participated per year. my Data_Participan t table has a primary key (ParticipantID) which does not allow duplicates and the Data_Main table is setup w/ a non-primary key field (ID) which will allow dupes. these two fields are joined in my query with the Data_Participan t.ParticipantID set to include all records and and only those records from the Data_Main.ID field where the records are equal.

to me, the join properties being setup like this would allow me to put any type of search criteria i would like under the Data_Main table fields and i would still get all of the Data_Participan t's tables as a result, but only those from Data_Main that i had filtered.

ultimately, i'd like to see all of my Data_Participan t data and only the Data_Main data that makes it through my filter/search criteria. am i not understanding how the join properties work?

Feb 8 '08 #1
3 3161
ADezii
8,834 Recognized Expert Expert
Query Join Properties

I have 2 tables. one (Data_Participa nt) has all of the data on individual participants. the other (Data_Main) has the data of how they participated per year. my Data_Participan t table has a primary key (ParticipantID) which does not allow duplicates and the Data_Main table is setup w/ a non-primary key field (ID) which will allow dupes. these two fields are joined in my query with the Data_Participan t.ParticipantID set to include all records and and only those records from the Data_Main.ID field where the records are equal.

to me, the join properties being setup like this would allow me to put any type of search criteria i would like under the Data_Main table fields and i would still get all of the Data_Participan t's tables as a result, but only those from Data_Main that i had filtered.

ultimately, i'd like to see all of my Data_Participan t data and only the Data_Main data that makes it through my filter/search criteria. am i not understanding how the join properties work?

Which Field in Data_Main is your Search/Filter based on? It appears as though your need a Left Outer Join in which 'ALL' Records from Data_Participan t are shown (Option 2 as indicated), while the Criteria on the Data_Main Field will naturally restrict those values.
Feb 9 '08 #2
silverstriip
5 New Member
i'm filtering on the Data_Main.aquir edyear field. not sure how to setup the one-to-many relationship. i would like to beable to see all of the Data_Participan t information even when there are no records that make it through the filter on the Data_Main table. this way, i will be able to pull up all of my data via year (aquiredyear) and add a record if it does not yet exist from my form.
Feb 11 '08 #3
ADezii
8,834 Recognized Expert Expert
i'm filtering on the Data_Main.aquir edyear field. not sure how to setup the one-to-many relationship. i would like to beable to see all of the Data_Participan t information even when there are no records that make it through the filter on the Data_Main table. this way, i will be able to pull up all of my data via year (aquiredyear) and add a record if it does not yet exist from my form.
I'm not sure if this would work in your specific case, but how about first checking to see if the Applied Filter would actually return any Records? If it does, apply the Filter, if not possibly modify the Record Source of the Form? The logic would be as follows:
Expand|Select|Wrap|Line Numbers
  1. 'Does Filter actually return any Records?
  2. If DCount("*", "Data_Main", "[AcquiredYear] = #mm/dd/yyyy#") > 0 Then
  3.   Me.Filter = "[AcquiredYear] = #mm/dd/yyyy#"
  4.   Me.FilterOn = True
  5. Else
  6.   Me.RecordSource = "some New Record Source"
  7. End If
Feb 11 '08 #4

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

Similar topics

5
351
by: flemming.madsen | last post by:
I have 3 tables A table of users containing the fields always required for a user. users: userid email name password projectid
4
2073
by: d.p. | last post by:
Hi all, I'm using MS Access 2003. Bare with me on this description....here's the situation: Imagine insurance, and working out premiums for different insured properties. The rates for calculating premiums are dependant on the country in which the client is in. Therefore, we have a Country table, with its list of rates, a client table and then the property table. Getting this is great, works fine, easy! Problem is, now I need to work out a...
1
3257
by: Robert | last post by:
I am trying to create a db for service providers by county. I'm relatively new to db programming, but I have done quite a bit of programming ranging from the old basic days up to doing some programming in the HotDocs software. I've kind of accomplished my goal in access, but I'm not quite there yet and figure I've really screwed something up. The db consists of 5 tables I believe. T1 is the main contact info, with an autonumber ID...
14
1732
by: Tom | last post by:
Using AccessXP in 2000 mode. I have the following tables --- TblLocation LocationID PropertyID StateID CountyID CityID
2
2316
by: me | last post by:
I have written a query that joins four or five tables. One table has 30,000 rows. Another table has only 200. I want to only return the 200 or so rows in the smaller table and columns from the other tables where data in the surrogate keys match, without returning the other data. It is an outer join, (for four tables, which one is the left and which one is the right?) and how do you define it in design mode in Msft Access Queries, as...
2
2709
by: Cindy | last post by:
I have an Access 2003 database with a query that works fine on my PC but does not work on another PC. My PC has older versions of Access installed as well as 2003 - the other PC only has Access 2003. The query is as follows: SELECT tblOrganization.strOrgName, tblPerson.strNameL, tblPerson.strNameF, tblPersonFCL_Courses.lngIDPerson, tblPersonFCL_Courses.strHOTest, tblPersonFCL_Courses.strCert, tblPersonFCL_Courses.ysnProcessed,...
3
1940
by: Genalube | last post by:
All right I am new at access but why would my calculated fields in my query self destruct all of a sudden? I tested these expressions, saved the query and closed it. I reopened them and tested it. Then left access for a minute, but left it open, and when I return to it I get the following: Compile error . in query expression '{quotes expression} This is the expression that is quoted when I try to run the query: ...
5
1801
by: vegak18 | last post by:
Dear Experts, I was was wondering if there was some way to specify output properties of a make table query. Specifically, I am haivng a problem with numbers being specified as text. while I realize I can go in and change the table properties after the table has been created, I create and replace this table quite often so that would become a laborious prcess. Is there some way I can make the query specify that for me. I am using access...
1
2771
by: babamc4 | last post by:
Hi All, I am trying to run a query to include null fields. My tables are as follows: Table Demographics 54 records (Main table) Table Follow Up During Radiotherapy 100+ records (Sub table) Table Follow Up Post RT 100+ (Sub table) Table Last Contact 54 records (Sub table) All are one to many except for Table Last Contact which is one to one.
0
9602
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9439
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10071
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10017
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7431
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6690
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5326
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3987
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2832
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.