I am trying to develop a report where in the PartNum footer the
average number of days between orders is calculated. I have
created the following:
Table: tblItemsRecvd
Fields:
PartNum
SupplrName
DateOrdrd
DateRecd
AmtRecd
Query: qryItemsRecvd based on tblItemsRcvd
PartNum Criteria: [Enter PartNum:]
SupplrName
DateOrdrd
DateRecd
AmtRecd
Report: rptItemsRecvd based on qryItemsRecvd
I would like to calculate the average number of days between orders for
the selected part number. Do I do it in the query (how?) or at the report
level (how?)? I am using Access2003 and am a novice.
TIA
|
|
0
|
|
|
|
Reply
|
Utf
|
6/6/2010 11:49:01 PM |
|
Hi,
i would do this in the query by using the DateDiff-Function.
Take a look at this link:
http://www.techonthenet.com/access/functions/date/datediff.php
Regards
Jörn
Am 07.06.2010 01:49, schrieb JohnL:
> I am trying to develop a report where in the PartNum footer the
> average number of days between orders is calculated. I have
> created the following:
> Table: tblItemsRecvd
> Fields:
> PartNum
> SupplrName
> DateOrdrd
> DateRecd
> AmtRecd
>
> Query: qryItemsRecvd based on tblItemsRcvd
> PartNum Criteria: [Enter PartNum:]
> SupplrName
> DateOrdrd
> DateRecd
> AmtRecd
>
> Report: rptItemsRecvd based on qryItemsRecvd
>
> I would like to calculate the average number of days between orders for
> the selected part number. Do I do it in the query (how?) or at the report
> level (how?)? I am using Access2003 and am a novice.
> TIA
>
|
|
0
|
|
|
|
Reply
|
UTF
|
6/7/2010 12:06:10 AM
|
|
JohnL wrote:
>I am trying to develop a report where in the PartNum footer the
>average number of days between orders is calculated. I have
>created the following:
>Table: tblItemsRecvd
>Fields:
> PartNum
> SupplrName
> DateOrdrd
> DateRecd
> AmtRecd
>
>Query: qryItemsRecvd based on tblItemsRcvd
> PartNum Criteria: [Enter PartNum:]
> SupplrName
> DateOrdrd
> DateRecd
> AmtRecd
>
>Report: rptItemsRecvd based on qryItemsRecvd
>
>I would like to calculate the average number of days between orders for
>the selected part number. Do I do it in the query (how?) or at the report
>level (how?)? I am using Access2003 and am a novice.
You can do it either place, but the quer would have to be
Totals type query, which may complicate things.
I think it is easier to do in a report with a text box
expression like:
=Avg(DateDiff("d", DateOrdrd, DateRecd))
in either the partNum group header and/or footer section.
--
Marsh
MVP [MS Access]
|
|
0
|
|
|
|
Reply
|
Marshall
|
6/7/2010 1:12:53 AM
|
|