Ver Mensaje Individual
  #5 (permalink)  
Antiguo 20/05/2011, 00:49
Avatar de Shizuka
Shizuka
 
Fecha de Ingreso: marzo-2011
Mensajes: 106
Antigüedad: 13 años, 1 mes
Puntos: 4
Respuesta: Duda para cargar image

Muchas gracias por responder :)

Las imàgenes si cargan, en todas las operaciones con el formulario, pero pasa algo raro al hacer actualizaciones, por que primero si carga, pero si hago otro cambio y luego me muevo a otro formulario y luego regreso a actualizaciones, y si presiono el boton para buscar con el inbutbox sale esto:

en los combos sale todo normal:



pero en el grid y en la base de datos no aparece





este es el codigo para el input box

Código vb:
Ver original
  1. Adodc1.Recordset.MoveFirst
  2.         dato = InputBox("INGRESE LA MATRÍCULA A BUSCAR :", "BUSQUEDA")
  3.        
  4.         If dato = "" Then Exit Sub
  5.        
  6.         Adodc1.Recordset.Find ("matricula=" + "'" + dato + "'")
  7.         If Adodc1.Recordset.EOF Then
  8.             MsgBox "LA MATRÍCULA QUE INGRESO NO EXISTE, POR FAVOR INTENTELO DE NUEVO", 64, "AVISO"
  9.             Adodc1.Recordset.MoveFirst
  10.             Exit Sub
  11.         End If
  12.        
  13.     'CARGAR LA IMAGEN, YA QUE SE ENCONTRO EL REGISTRO
  14.        Image1.Picture = LoadPicture(Label20.Caption)
  15.         Image2.Picture = LoadPicture(Label25.Caption)
  16.         Image3.Picture = LoadPicture(Label26.Caption)
  17.         Image4.Picture = LoadPicture(Label34.Caption)
  18.         Image5.Picture = LoadPicture(Label35.Caption)
  19.         Image6.Picture = LoadPicture(Label37.Caption)
  20.              
  21.      
  22.     'LOS COMBOS DEBEN ESTAR LLENOS
  23.      
  24.     'ASUMO QUE EL PRIMER ITEM DEL COMBO_GENERO ES "FEMENINO"
  25.        If UCase(Adodc1.Recordset("GENERO")) = "FEMENINO" Then Combo1.ListIndex = 0
  26.         If UCase(Adodc1.Recordset("GENERO")) = "MASCULINO" Then Combo1.ListIndex = 1
  27.        
  28.     'ASUMO QUE EL PRIMER ITEM DEL COMBO_NIVEL_ESCOLAR ES "PREESCOLAR"
  29.        If UCase(Adodc1.Recordset("NIVELE")) = "Maternal" Then Combo2.ListIndex = 0
  30.         If UCase(Adodc1.Recordset("NIVELE")) = "Preescolar" Then Combo2.ListIndex = 1
  31.         If UCase(Adodc1.Recordset("NIVELE")) = "Primaria" Then Combo2.ListIndex = 2

este el codigo para ejecutar la actualizacion

Código vb:
Ver original
  1. If Text1 = "" Or Text2 = "" Or Text3 = "" Or Text4 = "" Or Text5 = "" Or Text6 = "" Or Text7 = "" Or Text8 = "" Or Text9 = "" Or Text10 = "" Or Text11 = "" Or Text12 = "" Or Text13 = "" Or Text14 = "" Or Text15 = "" Or Text16 = "" Or Text17 = "" Or Text18 = "" Or Text19 = "" Or Text20 = "" Or Text21 = "" Or Text22 = "" Or Text23 = "" Or Text24 = "" Or Text25 = "" Or Text26 = "" Or Text27 = "" Or Combo1 = "" Or Combo2 = "" Or Combo3 = "" Or Combo4 = "" Or Combo5 = "" Or Label20 = "" Or Label25 = "" Or Label26 = "" Or Label34 = "" Or Label35 = "" Or Label37 = "" Then
  2. MsgBox "Faltan campos por llenar", vbInformation, "Aviso"
  3. Else
  4. With Adodc1
  5. If MsgBox("¿Está seguro de cambiar estos datos?", vbInformation + vbYesNoCancel, "Actualizar") = vbYes Then
  6. .Recordset.Update
  7. .Recordset.Requery
  8. End If
  9. End With
  10. End If



Pero creo que me salìa ese error por que en la actualizaciòn no habia usado el clear en los comboboxes del load tal y como me dijiste (solo en los demàs formularios)...ahhh esto esta raro, por que ya no me saliò error e_è seguramente era eso...Muchas gracias por tu ayuda :3 gracias mil n.n Si en algun futuro llego a tener problemas con esto mismo podrìa consultarte de nuevo?
__________________
Will you please tell me the way to the sky?

Última edición por Shizuka; 20/05/2011 a las 00:59