Report - Need to total overall performance (1 Viewer)

nickaccess

Registered User.
Local time
Today, 00:30
Joined
Jul 27, 2017
Messages
43
Todays puzzle. I am trying to get the overall performance with regards to a report in the footer. It shows applications either in "time" or "out of date" All I need is the overall "in time". How we perform. It just the last box, bottom right I cannot get the criteria right for it to do the sum. Having a thick day today. Can anyone tell me what is the right answer. Sorry to ask but today is STATS DAY, oh lucky me.

https://www.access-programmers.co.uk/forums/attachment.php?attachmentid=67074&stc=1&d=1501577312

Sorry it still will not post the screen shot only the link. Its me:eek:
 

Attachments

  • Everything.JPG
    Everything.JPG
    81.4 KB · Views: 262

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 07:30
Joined
May 7, 2009
Messages
19,246
The easiest way to go about is through code.
first remove the calculation formula from the textbox (total performance of everything).
well be writing code on the report's Load event.

Private Sub Report_Load()
Dim tot As Double
Dim cnt As Integer
Dim rs As DAO.Recordset
Set rs = DBEngine(0)(0).OpenRecordset(Me.RecordSource)
With rs
.MoveFirst
While Not .EOF
tot = tot + ![in_time]
cnt = cnt + 1
.MoveNext
Wend
.Close

End With
Set rs = Nothing
Me![TextboxNameOfPerformanceOfEveryting] = FormatPercent(tot / cnt)

End Sub
 

isladogs

MVP / VIP
Local time
Today, 00:30
Joined
Jan 14, 2017
Messages
18,258
If you are happy to do arne's approach, that's fine.

Otherwise, I think you just need
Code:
=[In_Time]/Count(*)
and format the control as Percentage with e.g. 1 d.p.

Or if you prefer...
Code:
=100*[In_Time]/Count(*)
where you keep the formatting as a number with e.g. 1d.p.
 

nickaccess

Registered User.
Local time
Today, 00:30
Joined
Jul 27, 2017
Messages
43
If you are happy to do arne's approach, that's fine.

Otherwise, I think you just need
Code:
=[In_Time]/Count(*)
and format the control as Percentage with e.g. 1 d.p.

Or if you prefer...
Code:
=100*[In_Time]/Count(*)
where you keep the formatting as a number with e.g. 1d.p.

PERFECT WORKED FIRST TIME -YEESSSSSSSS

Thank you so much ridders :D:D:D:D:D:D:D
 

Users who are viewing this thread

Top Bottom