469,621 Members | 1,715 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,621 developers. It's quick & easy.

Calculate with Dates in a query with a one to many relation between tables

How to cope with query output which provides all possible values based
on a one to many relationship between two tables. I'm only interested
in one answer per primary key in the 'one' table. I've tryed to filter
out several values, but it does not work (because then also correct
answers are lost) or still 'double' or wrong answers appear. In the
many table, there are records which are not necessary for my query (or
calcultions), but they do result in an additional output record in the
query.
Nov 13 '05 #1
1 1477
Guido wrote:
How to cope with query output which provides all possible values based
on a one to many relationship between two tables. I'm only interested
in one answer per primary key in the 'one' table. I've tryed to filter
out several values, but it does not work (because then also correct
answers are lost) or still 'double' or wrong answers appear. In the
many table, there are records which are not necessary for my query (or
calcultions), but they do result in an additional output record in the
query.


If your many table has 2 records that meet the criteria, you will have 2
records linking the one-to-many.

You can create a Totals query if you like or, when the query builder is
open, open the property sheet and set the values to Unique.

It appears you are not filtering the Many side correctly.

You might be better off to create a query to select records based on a
filter for the many side. Then create a query for the One side. Then
create a query to link these 2 queries together.
Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by salimshahzad | last post: by
reply views Thread by Michal Hlavac | last post: by
2 posts views Thread by Fendi Baba | last post: by
reply views Thread by devrayhaan | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.