R
roger.breton
Guest
I am running into a weird issue with "values not displaying correctly on a Tab control".
This is what I am getting at FormLoad :
You see the value in the first textbox, "0.0362"? In the SQL database, this is indeed the correct value for that particular field but all the other textboxes's values are wrong. It is as though the control has "copied" or taken its source from the same database item.
This is a code excerpt which shows how I load the value from the Data Table :
If Me.SQLDataSet.Color.Rows(RecordNo)("nm380").Equals(DBNull.Value) Then
tb380.Text = "0.000"
Else
tb380.Text = Me.CIMSQLDataSet.Color.Rows(RecordNo)("nm380")
End If
If Me.SQLDataSet.Color.Rows(RecordNo)("nm390").Equals(DBNull.Value) Then
tb390.Text = "0.000"
Else
tb390.Text = Me.SQLDataSet.Color.Rows(RecordNo)("nm390")
End If
If Me.SQLDataSet.Color.Rows(RecordNo)("nm400").Equals(DBNull.Value) Then
tb400.Text = "0.000"
Else
tb400.Text = Me.SQLDataSet.Color.Rows(RecordNo)("nm400")
End If
As soon as I navigate to the next record, the data displays correctly!
And when I navigate back to the first record, the data is also correct, all of a sudden :
Continue reading...
This is what I am getting at FormLoad :
You see the value in the first textbox, "0.0362"? In the SQL database, this is indeed the correct value for that particular field but all the other textboxes's values are wrong. It is as though the control has "copied" or taken its source from the same database item.
This is a code excerpt which shows how I load the value from the Data Table :
If Me.SQLDataSet.Color.Rows(RecordNo)("nm380").Equals(DBNull.Value) Then
tb380.Text = "0.000"
Else
tb380.Text = Me.CIMSQLDataSet.Color.Rows(RecordNo)("nm380")
End If
If Me.SQLDataSet.Color.Rows(RecordNo)("nm390").Equals(DBNull.Value) Then
tb390.Text = "0.000"
Else
tb390.Text = Me.SQLDataSet.Color.Rows(RecordNo)("nm390")
End If
If Me.SQLDataSet.Color.Rows(RecordNo)("nm400").Equals(DBNull.Value) Then
tb400.Text = "0.000"
Else
tb400.Text = Me.SQLDataSet.Color.Rows(RecordNo)("nm400")
End If
As soon as I navigate to the next record, the data displays correctly!
And when I navigate back to the first record, the data is also correct, all of a sudden :
Continue reading...