kentwoodjean
Technical User
I have a field that is formats as a text field 00:00:00 following Excel import. In Excel it is considered a general number, not particular format. In a previous post in Feb. (703-783067), dhookom assisted me with a cng of the text field to numerical for a basic report. The data I import has changed slightly and I was asked to create a crosstab now, and the info from my previous post doesn't work right.
I have a module like the following:
Function MakeMinutes(pstrText As String) As Double
Dim intHrs As Integer
Dim intMin As Integer
Dim intSec As Integer
intHrs = Val(Left(pstrText, InStr(pstrText, ":") - 1))
intMin = Val(Mid(pstrText, InStr(pstrText, ":") + 1, 2))
intSec = Val(Right(pstrText, 2))
MakeMinutes = intHrs * 60 + intMin + intSec / 60
End Function
Before, I used the following to format my text box in the footer so I could average my column: =Avg(MakeMinutes(nz([Duration], "00:00:00"))). This does not work with my crosstab. Can I do someting similar? I"ve tried a few different ways and no luck. I want to be able to sum [TheValue
uration] fields for each month and row into the [Total Of Duration: Duration] field for each row. Can that be done?
I have a module like the following:
Function MakeMinutes(pstrText As String) As Double
Dim intHrs As Integer
Dim intMin As Integer
Dim intSec As Integer
intHrs = Val(Left(pstrText, InStr(pstrText, ":") - 1))
intMin = Val(Mid(pstrText, InStr(pstrText, ":") + 1, 2))
intSec = Val(Right(pstrText, 2))
MakeMinutes = intHrs * 60 + intMin + intSec / 60
End Function
Before, I used the following to format my text box in the footer so I could average my column: =Avg(MakeMinutes(nz([Duration], "00:00:00"))). This does not work with my crosstab. Can I do someting similar? I"ve tried a few different ways and no luck. I want to be able to sum [TheValue