S
Stephen Witter
I am getting the following error when setting a ddl to a value from a
recordset:
System.NullReferenceException: Object reference not set to an instance
of an object
Here is my code:
lstPART_TYPE.SelectedItem.Selected = False
lstPART_TYPE.Items.FindByText(rst("PART_TYPE").value).Selected = True
The ddl has only two list items (bulk & sterile) and the value and
text are the same.
The database field only contains one or the other values.
I have other ddls doing the same thing in the same block of code and
they work fine.
The only difference between these and the one above is these all
contain
booelan values (value = 0 or 1, text = yes or no, db field is bit)
I can't seems to get past this one.
Any help is appreciated.
recordset:
System.NullReferenceException: Object reference not set to an instance
of an object
Here is my code:
lstPART_TYPE.SelectedItem.Selected = False
lstPART_TYPE.Items.FindByText(rst("PART_TYPE").value).Selected = True
The ddl has only two list items (bulk & sterile) and the value and
text are the same.
The database field only contains one or the other values.
I have other ddls doing the same thing in the same block of code and
they work fine.
The only difference between these and the one above is these all
contain
booelan values (value = 0 or 1, text = yes or no, db field is bit)
I can't seems to get past this one.
Any help is appreciated.