var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Problems with summing textboxes...
I have tried to add the contents of ten textboxes and place that sum into another textbox that is at the bottom of the column. as it loops through each textbox and reaches a textbox that is blank or empty, it kicks out an error. How can I check each textbox for a value and exclude the textboxes that are empty or Null?
Here is where I am.
Dim i As Integer
Item(0) = Moisture1.Value
Item(1) = Moisture2.Value
Item(2) = Moisture3.Value
Item(3) = Moisture4.Value
Item(4) = Moisture5.Value
Item(5) = Moisture6.Value
Item(6) = Moisture7.Value
Item(7) = Moisture8.Value
Item(8) = Moisture9.Value
Item(9) = Moisture10.Value
Item(10) = Moisture11.Value
Item(11) = Moisture12.Value
Item(12) = Moisture13.Value
Item(13) = Moisture14.Value
Item(14) = Moisture15.Value
For i = 0 To 14
If Not IsNull(Item(i)) Then
MoistureTotal = Item(i) + Item(i)
txtMoistureTotal.Value = MoistureTotal
Any Help would be greatly appreciated.
As long as you are using sum.. You could use the Nz command and have it return 0 if the field is null
You could use the Nz() function like this:
Item(0) = Nz(Moisture1.Value)
All null values will be converted to a zero, and the summation should work.
Thanks. I appreciate your help.