Calculate SUM across different recordsets
Hi all,
This USDA project formula has me stumped. Gets a type mismatch error on the lines that do the sum.
Tried without creating a DIM for each variable... same error.
What am I doing wrong here?
<%
Dim BldgLoadHarvest
BldgLoadHarvest = BldgTransmissionLoad.Fields.Item("BldgTransmissionLoad").Value
Dim AirLoadHarvest
AirLoadHarvest = AirChangeLoad.Fields.Item("AirChangeLoad").Value
Dim FieldHeat1
FieldHeat1 = FieldHeatDayOne.Fields.Item("FieldHeatDayOne").Value
Dim BinHeat1
BinHeat1 = BinHeatDayOne.Fields.Item("BinHeatDayOne").Value
Dim FieldHeat2
FieldHeat2 = FieldHeatDayTwo.Fields.Item("FieldHeatDayTwo").Value
Dim BinHeat2
BinHeat2 = BinHeatDayTwo.Fields.Item("BinHeatDayTwo").Value
Dim Resp1
Resp1 = RespDayOne.Fields.Item("RespirationDayOne").Value
Dim Resp2
Resp2 = RespDayTwo.Fields.Item("RespirationDayTwo").Value
Dim Residual
Residual = ResidualLoad.Fields.Item("ResidualLoad").Value
Dim LightsHarvest
LightsHarvest = Lights.Fields.Item("LightHeat").Value
Dim FanLoad
FanLoad = FanHeat.Fields.Item("FanHeat").Value
Dim ForkLiftHarvest
ForkLiftHarvest = ForkLift.Fields.Item("ForkLiftHeat").Value
Dim WorkersHarvest
WorkersHarvest = Workers.Fields.Item("HarvestWorkers").Value
Dim HarvestTons
HarvestTons=(BldgLoadHarvest+AirLoadHarvest+FieldHeat1+BinHeat1+FieldHeat2+BinHeat2+Resp1+Resp2+Residual+LightsHarvest+FanLoad+ForkLiftHarvest+WorkersHarvest)/12660
%>
<%
Dim BldgLoadStorage
BldgLoadStorage = BldgTransStorage.Fields.Item("BldgTrans_Storage").Value
Dim AirChangeStor
AirChangeStor = AirChangeStorage.Fields.Item("AirChangeStorage").Value
Dim RespStore
RespStor = RespStorage.Fields.Item("RespStorage").Value
Dim WorkersStor
WorkersStorage = WorkersStorage.Fields.Item("WorkersStorage").Value
Dim LightsStor
LightsStorage = Lights.Fields.Item("LightHeat").Value
Dim FanStor
FanStorage = FanHeat.Fields.Item("FanHeat").Value
Dim StorageTons
StorageTons = (BldgLoadStorage + AirChangeStor + RespStor + WorkersStor + FanStor) / 12660
%>
THANK YOU,
JACKSON BALL
