AronGahagan / cpt-dev

Code repository for the ClearPlan Toolbar
https://www.ClearPlanConsulting.com
3 stars 1 forks source link

cptCore - glitch in cptGetSums on Baseline Cost field with no baseline set #341

Closed AronGahagan closed 1 year ago

AronGahagan commented 1 year ago

Problem

When a task has no baseline set, the value of the underlying Baseline Cost field is "" (text).

If strFieldName = "Baseline Cost" Then dblCost = dblCost + oTask.BaselineCost

Solution

Implement type conversion.

If strFieldName = "Baseline Cost" Then dblCost = dblCost + Val(oTask.BaselineCost)

Also improve speed by converting the stacked If Then statments to a Select Case.

Todo: