Can any one help me in the following error.
am connecting database and comparing 3 columns to find the biggest number. the code is executing properly when am compling(i.e. when i compile with F8 key). but at the run time the value am getting is 0. please help me in this regards. the code which i used is
k=0
For i = 0 To 2
If Not (IsNull(rs(i)) Then
If k < Val(rs(i)) Then
k = Val(rs(i))
End If
End If
Next
rs.MoveNext
MsgBox k