object reference

Discussion in 'Questions (Windows Mobile)' started by dennishea, Aug 15, 2007.

  1. dennishea

    dennishea Active Member Licensed User

    This is my code

    Sub Table1_SelectionChanged (ColName, Row)
    a = Row
    textbox1.Text = table1.Cell("Internal",a)
    textbox6.Text = table1.Cell("CldOd",a)
    textbox2.Text = table1.Cell("CldFrPos",a)
    textbox7.Text = table1.Cell("HtOd",a)
    textbox3.Text = table1.Cell("HtFPos",a)
    textbox8.Text = table1.Cell("AmtWire",a)
    textbox4.Text = table1.Cell("Pph",a)
    textbox9.Text = table1.Cell("WrSize",a)
    textbox5.Text = table1.Cell("CycTime",a)
    textbox10.Text = table1.Cell("Mach",a)
    Form2.Show
    form2.Refresh
    End Sub

    textbox10.text dumps an error code of object reference not set to an instance of an object.

    If I remark it out the sub works fine. :sign0148: :confused:

    dennishea
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    I don't think that this is the problem here, but you should avoid showing a new form in the Table_SelectionChanged event. At the end of this event the focus returns to the table.
    Does TextBox10 exist?
     
  3. dennishea

    dennishea Active Member Licensed User

    @ Erel

    yes textbox10 does exist
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    Please send me the code (or upload it here if you like) and I would check it.
    erel@basic4ppc.com
     
  5. dennishea

    dennishea Active Member Licensed User

    Erel here is the code and a text file for it to load.
     

    Attached Files:

  6. Erel

    Erel Administrator Staff Member Licensed User

    There is no Mach column in your CSV file.
     
  7. dennishea

    dennishea Active Member Licensed User

    Thanks Erel

    I thought this text file worked under version 4 and was at a loss when it didn't with 5.50. I can see I have some learning to do. In the end I want to load it into a sqlite db, that will be a whole new can of worms. Thanks again for your fast response and you have created a nice product.

    dennishea :sign0060:
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice