 
			
				24/11/2008, 21:13
			
			
			     |  
        |     |    |    Fecha de Ingreso: noviembre-2005  
						Mensajes: 21
					  Antigüedad: 20 años Puntos: 0     |        |  
  |      Respuesta: mostrar mensaje si no existe el usuario en la tabla        Private Sub txtNombre_Change() 
    Set rs = cn.Execute("SELECT * FROM TablaGuardarFactura WHERE Nombre + Apellido Like '%" & txtNombre.Text & "%'") 
    LlenarTabla   
End Sub     
Private Sub LlenarTabla() 
On Error Resume Next 
rs.CursorLocation = adUseClient 
cn.CursorLocation = adUseClient   
    If rs.RecordCount <> 0 Then 
        With MSFlexGrid1 
            .Rows = 1 
            .ColWidth(1) = 1300 'Num_Factura 
            .ColWidth(2) = 1200 'Fecha 
            .ColWidth(3) = 2000 'Descripcion 
            .ColWidth(4) = 1200 'Precio 
            .ColWidth(5) = 1200 'Total_Gral 
            .ColWidth(6) = 1700 'Tipo De Pago 
            .ColWidth(7) = 1700 'Doctor   
            Dim i As Integer 
            For i = 1 To rs.RecordCount 
                MSFlexGrid1.AddItem vbTab & rs("C_Num_Factura").Value & vbTab & rs("C_Fecha").Value & vbTab & rs("Descripcion").Value & vbTab & rs("Precio").Value & vbTab & rs("C_Total_Gral").Value & vbTab & rs("C_Tipo_Pago").Value & vbTab & rs("C_Doctor").Value 
                rs.MoveNext 
            Next i 
        End With 
    End If 
    Me.Caption = "Facturas Encontradas: " & CStr(rs.RecordCount) 
    Label5.Caption = "" & CStr(rs.RecordCount) 
End Sub           |