I have a report where one of the things it displays is the time it took person "A" and the time it took person "B" to complete a sample and the difference between the two. If the person forgets to write the time it took them to finish the sample the person entering the data will either put in a 1 or 0 or leave it blank. I need to have an average time difference for one person compared to all the people that did the other half of the sample. Currently This is what I have.
If IsNull(Me.A1stTime) Or IsNull(Me.B1stTime) _
Or Me.A1stTime = 0 Or Me.B1stTime = 0 _
Or Me.A1stTime = 1 Or Me.B1stTime = 1 Then
'Don't Count Them
Else
TmeCnt = TmeCnt + 1
End If
If IsNull(Me.A1stTime) Or IsNull(Me.B1stTime) _
Or Me.A1stTime = 0 Or Me.B1stTime = 0 _
Or Me.A1stTime = 1 Or Me.B1stTime = 1 Then
Me.TimeDifference = 0
Else
Me.TimeDifference = Me.Report1stTime - Me.CompareTo1stTime
End If
This is in the detail format event. I have Dim TmeCnt As Long
and the text box for the calculations in my report is Me.Timecounter=TmeCnt.
The numbers I get are completely wrong. I do the averages by hand and thy are close but just not right. Also when I print It divides my average by two (Which is closer to the real average but not perfect) One evaluation was correct the rest were not.
I am sorry for the long confusing post but this has been eating at me for days and I can't quite fix this.
Thank you for any help and suggestions. I need to get this working within the next couple of days for my boss.
If IsNull(Me.A1stTime) Or IsNull(Me.B1stTime) _
Or Me.A1stTime = 0 Or Me.B1stTime = 0 _
Or Me.A1stTime = 1 Or Me.B1stTime = 1 Then
'Don't Count Them
Else
TmeCnt = TmeCnt + 1
End If
If IsNull(Me.A1stTime) Or IsNull(Me.B1stTime) _
Or Me.A1stTime = 0 Or Me.B1stTime = 0 _
Or Me.A1stTime = 1 Or Me.B1stTime = 1 Then
Me.TimeDifference = 0
Else
Me.TimeDifference = Me.Report1stTime - Me.CompareTo1stTime
End If
This is in the detail format event. I have Dim TmeCnt As Long
and the text box for the calculations in my report is Me.Timecounter=TmeCnt.
The numbers I get are completely wrong. I do the averages by hand and thy are close but just not right. Also when I print It divides my average by two (Which is closer to the real average but not perfect) One evaluation was correct the rest were not.
I am sorry for the long confusing post but this has been eating at me for days and I can't quite fix this.
Thank you for any help and suggestions. I need to get this working within the next couple of days for my boss.