Hi Peter,
Oh Dear!! If you think that the months part of the routine is not working then lets test it using the code below. (I Guess that the part
Quote:
quote:Month(1) = rs("Month01")
Month(2) = rs("Month02")
Month(3) = rs("Month03")
Month(4) = rs("Month04")
Month(5) = rs("Month05")
Month(6) = rs("Month06")
|
is an array being populated from the recordset.
Code:
Dim arrMonths(80) 'Month Array to hold rst data (Option Base 0??)
Dim e 'Array Element
Dim x as integer
'Load the Months array
Do While x < 81 'You have 81 months/81 fields ?
If x < 10 Then
arrMonths(x) = rs("Month0" & x + 1)
Else
arrMonths(x) = rs("Month" & x + 1)
End If
x =x + 1
Loop
'Now TEST the array for values
For Each e In arrMonths()
If arrMonths(e) > 0 Then
'OK
Else
'If this msg is shown then this is the cause of your problems
MsgBox "Element empty"
End If
Next e
Replace your code
Quote:
quote:Month(2) = rs("Month02")
Month(3) = rs("Month03")
Month(4) = rs("Month04")
Month(5) = rs("Month05")
|
etc. with the snippet above. Also the loop part is going to be easier to view than 81 lines of Month(x) = rs("MonthX")! Let us know what happens