Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access: Help with field calculation for average?

Status
Not open for further replies.

RichardPrewitt

IS-IT--Management
Apr 16, 2002
57
0
0
US
ok heres the story.

I have a program that is writing to Access. I have a few reports in Access that the program prints.

Now on one of these reporst I have say 6 fields:

[machine] [perm number] [% complete]

[task #] [last time completed] [description]



Now I sorted the first row by [machine number] ascending and the second row by [last time completed] Descending (they want the oldest one) and repeat the second line until end of records and go to next [machine] and just loop that. The problem is that when I sort the second line by [last time completed] my [% complete] only calculates the average of the first record (or maybe its the last, I dont know) If I remove the [last time completed] field then it works perfectly. any questions? The [% complete] field is based on 1's and 0's in a database field. total number / sum of 1's and 0's = average. I think that I need to change the query somehow.

All of these fields are from the same table and same query.
The query is just a list of the above fields and the [% complete] is total property set to avg and the rest are set to group by.

Any help would be greatly appreciated.

- Thanks,
Richard

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top