Link to home
Start Free TrialLog in
Avatar of turbot_yu
turbot_yuFlag for Singapore

asked on

Cannot hit the if condition by function's return value

                       If CheckTSTrend(temptimeStart, recid) = True Then
                            'Get data and upload
                            GetTrendData pqdifLogicalObj, pRecordObserv, TrendData
                        End If

Cannot get to the  GetTrendData, though CheckTSTrend is true

The function is as below,

    MyRs.Open strSQL, cn
    If Not MyRs.EOF Then
        If CStr(timeStart) > MyRs(0) Then
            CheckTSEvent = True
        Else
            CheckTSEvent = False
        End If
    End If
   
'    cmd.Execute
    cn.CommitTrans
    cn.Close

End Function
ASKER CERTIFIED SOLUTION
Avatar of Brian Mulder
Brian Mulder
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial