Foros del Web » Programación para mayores de 30 ;) » Programación General » Visual Basic clásico »

problemas con datacombo

Estas en el tema de problemas con datacombo en el foro de Visual Basic clásico en Foros del Web. Tengo un datacombo ligado a una tabla de access llamada Empresa pero no me deja seleccionar ningun nombre del datacombo mi codigo es el sig ...
  #1 (permalink)  
Antiguo 29/07/2005, 12:58
 
Fecha de Ingreso: abril-2005
Mensajes: 65
Antigüedad: 19 años
Puntos: 0
problemas con datacombo

Tengo un datacombo ligado a una tabla de access llamada Empresa
pero no me deja seleccionar ningun nombre del datacombo mi codigo es el sig

Private Sub DataCombo9_Click(Area As Integer)

If DataCombo9.Text = "GIGANTE" Then
Text4.Text = "GIGANTE, S.A."
Text2.Text = "GIGANTE, S.A."
Text5.Text = "AV.VALLEJO 1361-E"
Text3.Text = "AV.VALLEJO 1361-E"
Text7.Text = "VALLEJO"
Text8.Text = "GUSTAVO A. MADERO"
Text10.Text = "0"
Text11.Text = "0"
Text12.Text = "5"
Text9.Text = "D.F."
Text13.Text = "0"
Text14.Text = "9"
Text15.Text = "GIGANTE,S.A."
Text16.Text = "CONOCIDO"
Text6.Text = ""
Text17.Text = ""
Text18.Text = ""
Text6.Text = InputBox("NUMERO DE ESTABLECIMIENTO TIF")
Text17.Text = InputBox("NUMERO ESTABLECIMIENTO TIF EN DESTINO")
Text18.Text = InputBox("POBLACION DE LA EMPRESA EN DESTINO")

ElseIf DataCombo9.Text = " SANBORNS" Then
Text4.Text = "SANBORNS, S.A."
Text2.Text = "SANBORNS, S.A."
Text5.Text = "VIADUCTO M.ALEMAN No.705"
Text3.Text = "VIADUCTO M.ALEMAN No.705"
Text7.Text = "G.MEXICO"
Text8.Text = "IZTACALCO"
Text10.Text = "0"
Text11.Text = "0"
Text12.Text = "6"
Text9.Text = "D.F."
Text13.Text = "0"
Text14.Text = "9"
Text15.Text = "SANBORNS,S.A."
Text16.Text = "CONOCIDO"
Text6.Text = ""
Text17.Text = ""
Text18.Text = ""
Text6.Text = InputBox("NUMERO DE ESTABLECIMIENTO TIF")
Text17.Text = InputBox("NUMERO ESTABLECIMIENTO TIF EN DESTINO")
Text18.Text = InputBox("POBLACION DE LA EMPRESA EN DESTINO")

ElseIf DataCombo9.Text = " ALIDESA" Then
Text4.Text = "ALIMENTOS DESHIDRATADOS, S.A."
Text2.Text = "ALIMENTOS DESHIDRATADOS, S.A."
Text5.Text = "H.GALEANA No.5"
Text3.Text = "H.GALEANA No.5"
Text7.Text = "GPE.DEL MORAL"
Text8.Text = "IZTAPALAPA"
Text10.Text = "0"
Text11.Text = "0"
Text12.Text = "7"
Text9.Text = "D.F."
Text13.Text = "0"
Text14.Text = "9"
Text6.Text = InputBox("NUMERO DE ESTABLECIMIENTO TIF")
Text15.Text = InputBox("NOMBRE DE LA EMPRESA EN DESTINO")
Text16.Text = InputBox("DOMICILIO DE LA EMPRESA EN DESTINO")
Text17.Text = InputBox("NUMERO ESTABLECIMIENTO TIF EN DESTINO")
Text18.Text = InputBox("POBLACION DE LA EMPRESA EN DESTINO")

ElseIf DataCombo9.Text = "VARIOS" Then
Text4.Text = InputBox("NOMBRE DE LA EMPRESA")
Text2.Text = Text4.Text
Text5.Text = InputBox("DOMICILIO DE LA EMPRESA")
Text3.Text = Text5.Text
Text7.Text = InputBox("POBLACION DE LA EMPRESA")
Text8.Text = InputBox("MUNICIPIO DE LA EMPRESA")
Text10.Text = InputBox("CLAVE DEL MUNICIPIO")
Text11.Text = InputBox("CLAVE DEL MUNICIPIO")
Text12.Text = InputBox("CLAVE DEL MUNICIPIO")
Text9.Text = InputBox("ESTADO")
Text13.Text = InputBox("CLAVE DEL ESTADO")
Text14.Text = InputBox("CLAVE DEL ESTADO")
Text6.Text = InputBox("NUMERO DE ESTABLECIMIENTO TIF")
Text15.Text = InputBox("NOMBRE DE LA EMPRESA EN DESTINO")
Text16.Text = InputBox("DOMICILIO DE LA EMPRESA EN DESTINO")
Text17.Text = InputBox("NUMERO ESTABLECIMIENTO TIF EN DESTINO")

End If
End Sub
Al momento de hacer click en el datacombo inmediatamente selecciona GIGANTE y sale el input box.


Alguna idea?
Gracias por su apoyo

Última edición por gavafra; 29/07/2005 a las 13:06 Razón: faltan datos
  #2 (permalink)  
Antiguo 29/07/2005, 13:09
Avatar de GeoAvila
Colaborador
 
Fecha de Ingreso: diciembre-2003
Ubicación: Antigua Guatemala
Mensajes: 4.032
Antigüedad: 20 años, 4 meses
Puntos: 53
que es eso..??

eso no se hace asi muchacho....

lo que tenes que hacer es trabajar con un DBcombo, para que podas listar el nombre de la empresa y su codigo y con una consulta podas filtrar los datos y ponerlos en formulario como lo estas presentando actualmente.

para ver como manejar el dbcombo en las faq's hay un ejemplo..

nos vemos..
__________________
* Antes de preguntar lee las FAQ, y por favor no hagas preguntas en las FAQ
Sitio http://www.geoavila.com twitter: @GeoAvila
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 13:56.