In the VBA Editor, I'd add
Code:
Function hms2c(hms As String) As Integer
' ptp 20040404 Covert "[ x h][ y m][ z s]" string to integer seconds
Dim retval As Integer ' return value
Dim c As String ' current character
retval = 0: d = "": hms = LCase(hms)
While hms <> ""
c = Left(hms, 1): hms = Mid(hms, 2)
If 0 < InStr(1, "0123456789", c) Then d = d & c
If "h" = c Then retval = retval + 3600 * Val(d): d = ""
If "m" = c Then retval = retval + 60 * Val(d): d = ""
If "s" = c Then retval = retval + Val(d): d = ""
Wend
hms2c = retval
End Function
In the Query, I'd use:
Code:
SELECT Table1.hms, hms2c([hms]) AS Expr1
FROM Table1;
You'll probably find other uses for that function if you deal with these strings much.
-PatP