Average

AthenaBS

New member
Local time
Today, 00:05
Joined
Dec 10, 2005
Messages
5
I apologise for my ignorance, but I’m very new to Access.

I have a database of dates, that I need to analyse.

I have created a Form called "DateRange" with 2 date fields;
Text1 = Date From
Text2 = Date to
Command1 = Preview Report

My Query has 2 fields;
Slotdate = all the dates (show as 20051210)
Actdur = Actual Duration (show as numbers 1 or 12 or -3 etc)

The SQL View is;
SELECT slotapp.slotdate, slotapp.actdur
FROM slotapp
WHERE (((slotapp.slotdate) Between [Forms]![DateRange]![Text1] And [Forms]![DateRange]![Text2]));


I just want to calculate an average of Actual Duration
So that my report displays the average duration between the date ranges.

Any assistance in this matter would be greatly appreciated
 
Hi Athena - welcome!

Probably the easiest thing to do is to create a second query that uses your first query as the basis. (I.e. the same way that you based your first query on a table, you can base another query on your first query).

In design view for the new query, hit the totals button near the top of the screen (it is shown by the letter sigma, a funny looking "E"). This will give you a "total" line in the design view grid. Choose average for the function for the Actual Duration variable.

If you still have questions, post back!

hope that helps,

- g
 

Users who are viewing this thread

Back
Top Bottom