I'm working in VB.NET trying to load an idiot-level combobox from an XML file. You'd think it would be easy.
The list of options to appear was preped in Access and saved to an XML file. So, the format is straight forward and shouldn't have an errors. There was a schema file output at the sametime (although I am not including it as I don't feel its germane.).
The XML file data looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<Description>Less than $1 Million</Description>
<Description>$1 to $4.9 Million</Description>
My research of this site says the code to load these two options should look something like what's below. I am trying to load a combo called cmbMarketCap with two market cap ranges, regardless of what their "Status" value stored in the XML file.
'Clear target combobox to be on safe side
Dim ds As New System.Data.DataSet
'Load into combobox control
r = ds.Tables(0).Columns("RecN
ber = ds.Tables(0).Columns("Desc
The app is reporting an error when it hits the ValueMember assignment line.
It says - "An unhandled exception of type 'System.NullReferenceExcep
tion' occurred. Additional information: Object reference not set to an instance of an object."
I'm stumped. Any thoughts?