Combobox Selectedindex changed event

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a combo box that updates the filter proprerty of a dataview, which
works fine but when the form tries to close I get a
system.nulreferenceexception.

this is the code in the selectedindex_changed event
dvModels.RowFilter = ("fimakefk = " + Me.cboMake.SelectedValue.ToString)

I have used IsNothing for both the dataview and the contol and both return
false, so I am not sure what is throwing the error.
 
shanesj said:
I have a combo box that updates the filter proprerty of a dataview, which
works fine but when the form tries to close I get a
system.nulreferenceexception.

this is the code in the selectedindex_changed event
dvModels.RowFilter = ("fimakefk = " + Me.cboMake.SelectedValue.ToString)

I have used IsNothing for both the dataview and the contol and both return
false, so I am not sure what is throwing the error.
Probably the simplest would be to set a boolean flag that is true when
the form is closing. So, if not flag, then set the row filter.

Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top