Cathi:
Here we go again. The null problem disapear after I move the declaration after the asignment of space(1) to the column "Num_control" using the code sample that you show me long time ago.
But now I got another unexplain message that maybe you saw it already and have the reason for that, the following message was displayed
---------------------------
---------------------------
Can't bind to property or column num_control on DataSource.
Parameter name: dataMember
---------------------------
OK
---------------------------
The Subroutine with problem is here
Private Sub ENTREVISTA_INITIAL_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AddHandler Riesgo_DataGrid1.MouseUp, AddressOf Riesgo_datagrid1_mouseup
AddHandler Off_site_DataGrid1.MouseUp, AddressOf Off_site_DataGrid1_MouseUp
'AddHandler Socio_Econo_grid.CurrentCellChanged, AddressOf Socio_Econo_grid_currentcellchanged
Try
'Attempt to load the dataset.
Me.LoadDataSet()
Me.LoadDataset4()
Me.BindingContext(ObjDatos_personales_sol1, "Datos_personales_sol").EndCurrentEdit()
dr = ObjDatos_personales_sol1.Tables(0).NewRow()
dr(0) = Space(1)
dr(3) = Space(1)
dr(4) = Space(1)
ObjDatos_personales_sol1.Tables(0).Rows.Add(dr)
Me.BindingContext(ObjDatos_personales_sol1, "Datos_personales_sol").Position = ObjDatos_personales_sol1.Tables(0).Rows.Count - 1
Dim SocSecNum As New Binding("Text", ObjDatos_personales_sol1, "num_control")
AddHandler SocSecNum.Format, AddressOf Me.TextBox2_FormatSS
AddHandler SocSecNum.Parse, AddressOf Me.TextBox2_DrafSS
TextBox2.DataBindings.Add(SocSecNum)
I = 0
Catch eLoad As System.Exception
'Add your error handling code here.
'Display error message, if any.
MessageBox.Show(eLoad.Message)
End Try
End Sub