Subform Query: Displaying records that share same field values as current record

ilikecats

New member
Local time
Yesterday, 22:59
Joined
Jan 1, 2020
Messages
15
Yet another question about the Sim tracking database I was having trouble with earlier.

Within my [Playable Sims subform], I'd like to create a datasheet subform to display all the siblings and half-siblings of the currently selected Sim. Here's what I did so far:

I have a table, [Sim Births], which has three relevant fields: Sim, Mother, and Father. (There's other fields too, but these are the three I need.) The "Sim" field is linked to my [Playable Sims] field via the SimID (autonumber). As well, the "Mother" and "Father" fields use a SELECT to pull the names from the [Playable Sims] table.

I created a query, [PlayableSimParents], which currently looks like this:

Code:
SELECT [Playable Sims].[Sim Name], [Sim Births].Mother, [Sim Births].Father
FROM [Playable Sims] LEFT JOIN [Sim Births] ON [Playable Sims].SimID = [Sim Births].[Sim];

This is where I get stuck. I'm not sure how to go about selecting the records that share the same values within the Mother or Father field. I took a look at the "find duplicates" query generated by the query wizard, but couldn't understand it. :confused:

Thanks again. :)
 
I haven't read your earlier posts so this may be missing the mark.
First of all why use a LEFT JOIN rather than an INNER JOIN?

If you want records where mother OR father are identical, specify that in two different rows using the criteria lines in the query design.
 

Users who are viewing this thread

Back
Top Bottom