Check1.Value = rs.Fields("field10")
Your naming convention suggests that
Check1
is a checkbox and thus it's value can be either
True
or
False
.
Now, based on the error, it looks like
rs.Fields("field10")
is not True or False. Either it is
Nothing
or something other than boolean value.
First check for
Nothing
, post that convert the value into bool and then assign to checkbox.
Try:
If rs.Fields("field10") Is Not Nothing
Check1.Value = Convert.ToBoolean(rs.Fields("field10"))
End If
P.S.: Above is just a sample code snippet. It still does not makes sure that the returned value is of Bool type.