Hi. I am trying to create a fairly complex expression field and it seems not to work. The VBScript below when run as part of a .vbs file works fine and returns the results I expect. However, the C1ReportDesigner VBScript Editor says I have a syntax error on line 2, char 1.
I have tried declaring each variable ala option explicit, but it did no good.
The name of the database field is lengthMinutes.
The name of the field I am trying to create is LengthField. I am trying to return the value using LengthField.Value (down at the end). not sure if that is the right way to do it.
Anyway, if anyone can tell me what my syntax error is, or how to accomplish what I am trying to do, that would be fantastic
here is the script:
x =
lengthMinutes
h = x \ 60
If h = 0 Then h = 12
m = x
Mod 60ms = String(2 - Len(CStr(m)) , "0") + CStr(m)
thetime =
CStr(h) + ":" + ms
LengthField
.Value = thetime