G
Guest
I'm using Access 2002.
(1) I have two tables with a one-to-many relation between them. To make
this discussion clearer, let's call the two tables Table1 and Table2, where
field Title is unique in Table1 but may have the same value in multiple
records in Table2. Let's suppose there's also another field in Table2 called
Date.
For each record in Table1, I'd like to find, say, the largest value of Date
in records in Table2 associated with the record in Table2. That is, for a
record in Table1, I'd like to find the maximum value of Date among all
records in Table2 that have the same Title as the given record in Table1.
(Assume there are no ties in the value of Date in Table2 among records with
the same value of Title.)
(2) To complicate things further, suppose there's a third table, Table3, and
there's a one-to-many relation between Table2 and Table3 on another field,
say SubTitle. Suppose Table3 has a field called Amount. Now, for each
record in Table1, I'd like to find the average value of the Amounts
associated with the record in Table2 that has the maximum value of Date.
Surely these are easily done in queries. Unfortunately I'm a neophyte in
Access, so I don't know how to go about this. Can someone help?
(1) I have two tables with a one-to-many relation between them. To make
this discussion clearer, let's call the two tables Table1 and Table2, where
field Title is unique in Table1 but may have the same value in multiple
records in Table2. Let's suppose there's also another field in Table2 called
Date.
For each record in Table1, I'd like to find, say, the largest value of Date
in records in Table2 associated with the record in Table2. That is, for a
record in Table1, I'd like to find the maximum value of Date among all
records in Table2 that have the same Title as the given record in Table1.
(Assume there are no ties in the value of Date in Table2 among records with
the same value of Title.)
(2) To complicate things further, suppose there's a third table, Table3, and
there's a one-to-many relation between Table2 and Table3 on another field,
say SubTitle. Suppose Table3 has a field called Amount. Now, for each
record in Table1, I'd like to find the average value of the Amounts
associated with the record in Table2 that has the maximum value of Date.
Surely these are easily done in queries. Unfortunately I'm a neophyte in
Access, so I don't know how to go about this. Can someone help?