need help making a query(s) to categorize time between ship date and repair date

weeblebiker

Registered User.
Local time
Yesterday, 21:47
Joined
May 27, 2010
Messages
70
I have a repairs db that records [serial number] and [date in for repair], and other info.

I've been asked to make a report to summarize the number of units [serial number] that come back for repair by time interval between [ship date] and the first [date in for repair].

the [serial number] and [ship date] are in a linked excel file table which contains unique [serial number] entries.

The [serial number] and [date in for repair] are in the access table, there may be multiple [serial number]s entered with different [date in for repair] as in repaired multiple times.

1st query I need help with
I want to list all the [serial numbers] in the access table with only the earliest [date in for repair] returned.

2nd query I need help with
then I need to compare the 1st query results list of [serial numbers] and [date in for repair]to the excel table list of [serial numbers] and [ship dates],

I've found the =DateDiff('d'[ship date],[date in for repair])

I haven't done a query with two data sources before and not sure how to go about getting the DateDiff for each serial number :( :(

once I get results from the DateDiff, for each serial number, I am comfortable handling the Sum(IIf statements to summarize the results and do the serial number range select criteria in the form.
 
so I have the two queries working now,
easy peasy, enable Totals so the Total row apears in the query design view
query1 for the repair table:
[Serial #] Total: Group by
[Date in] Total: Min

Query2 for linking the date sold and repair date
select the sales excel table with the sn and ship date, and the Query 1. link the serial numbers.
select [Serial Number] and [ship date] from the excel table and [Min ofDate in] from the query 1
 

Users who are viewing this thread

Back
Top Bottom