Query Help...

  • Thread starter Thread starter Gary B
  • Start date Start date
G

Gary B

Table 1 (Master)
CustNo (PK)
CustName

Table 2 (Detail)
DateTime (PK)
CustNo (FK)
CustStatus

How can I return a query that gives me the CustNo & CustStatus, but just the
newest entry for Table 2
 
assuming that the DateTime field is a date/time "stamp" for each record as
it's entered, try a Totals query that returns the Max record in the DateTime
field.

hth
 
You can create 2 queries,
1. Group by query on Table2 that return CustNo + Max of DateTime as
MaxOfDateTime
2. Both Query1 + Table2 join together link the fields CustNo to CustNo and
MaxOfDateTime to DateTime, output all the fields from table2 that will give
you what you want.

or you can create on query based on table2, and on the criteria of the date
you can write another select to select the max of the date of that Cust.
 
Back
Top