Ver Mensaje Individual
  #2 (permalink)  
Antiguo 09/02/2010, 12:57
devilguzz
 
Fecha de Ingreso: marzo-2004
Mensajes: 70
Antigüedad: 21 años
Puntos: 0
Respuesta: No pasa valores

Cita:
Iniciado por serbc27 Ver Mensaje
Hola tengo un formulario que desde hay abro otro sin cerrar ninguno

Private Sub cmdEmpresas_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdEmpresas.Click
Dim oListadoEmpresas As New frmListadoEmpresas
oListadoEmpresas.Show()
End Sub

En el otro formulario tengo un datagriview que al hacer doble click, selecciona y devuelve el valor.

Private Sub dtListado_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles dtListado.DoubleClick
Dim oContrataciones As New frmContrataciones
If Me.dtListado.CurrentRow.Cells("nombre").Value.ToSt ring = " " Then
MsgBox("No hay ningun elemento seleccionado")
Exit Sub
Else
If Me.dtListado.CurrentRow.Cells("nombre").Value.ToSt ring = " " Then
MsgBox("No hay ningun elemento seleccionado")
Exit Sub
Else
oContrataciones.txtEmpresa.Text = dtListado.CurrentRow.Cells("nombre").Value
Me.Close()
End If
End If
End Sub

Pero oContrataciones.txtEmpresa.Text = dtListado.CurrentRow.Cells("nombre").Value no me hace nada
supongo que el formulario que llama a frmListadoEmpresas es frmContrataciones...

si al hacer doble CLICK vuelves a instanciar otra vez frmContrataciones, sera una ventana muy distinta a la que tienes ... intenta tu codigo sin instanciarla

Private Sub cmdEmpresas_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdEmpresas.Click
Dim oListadoEmpresas As New frmListadoEmpresas
oListadoEmpresas.Show()
End Sub

En el otro formulario tengo un datagriview que al hacer doble click, selecciona y devuelve el valor.

Private Sub dtListado_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles dtListado.DoubleClick

If Me.dtListado.CurrentRow.Cells("nombre").Value.ToSt ring = " " Then
MsgBox("No hay ningun elemento seleccionado")
Exit Sub
Else
oContrataciones.txtEmpresa.Text = dtListado.CurrentRow.Cells("nombre").Value
Me.Close()
End If
End Sub
__________________
GuzZpaWn