PARA AFOGUTU
Publicado por Mortadelo (29 intervenciones) el 23/10/2001 00:32:44
ESTE es el codigo que tengo en el evento keypress de un text mas el codigo que tu me as puesto , Muchas gracias , pero meda fallo en
Set Me.Data1.RecordSource = "Alta_de_Clientes"
me manda un msgbox " Error de compilacion, uso no valido de la propiedad"
Private Sub Text16_KeyPress(KeyAscii As Integer)
Dim busqueda As String
Select Case Me.Combo1.Text
Case "IDNombre_Apellidos"
Set Me.Data1.RecordSource = "Alta_de_Clientes"
Set Me.Text1.DataSource = Me.Data1
Set Me.Text2.DataFormat = "IDNombre_Apellidos"
Case "ID_DNI"
Set Me.Data1.RecordSource = "Alta_de_Clientes"
Set Me.Text1.DataSource = Me.Data1
Set Me.Text2.DataFormat = "ID_DNI"
Case Else
'ACA LO DEJÁS VACÍO
End Select
If KeyAscii = 13 Then
KeyAscii = 0
busqueda = Combo1.Text & " like '" & Text16.Text & "*" & "'"
Me.Data1.Recordset.FindFirst (busqueda)
Text20.Visible = False
Text16.Visible = False
Combo1.Visible = False
Frame1.Width = 6132
Frame1.Height = 732
If Data1.Recordset.NoMatch Then
MsgBox "No se han encontrado coincidencias", vbExclamation, "¡ Atencion !"
End If
End If
End Sub
Set Me.Data1.RecordSource = "Alta_de_Clientes"
me manda un msgbox " Error de compilacion, uso no valido de la propiedad"
Private Sub Text16_KeyPress(KeyAscii As Integer)
Dim busqueda As String
Select Case Me.Combo1.Text
Case "IDNombre_Apellidos"
Set Me.Data1.RecordSource = "Alta_de_Clientes"
Set Me.Text1.DataSource = Me.Data1
Set Me.Text2.DataFormat = "IDNombre_Apellidos"
Case "ID_DNI"
Set Me.Data1.RecordSource = "Alta_de_Clientes"
Set Me.Text1.DataSource = Me.Data1
Set Me.Text2.DataFormat = "ID_DNI"
Case Else
'ACA LO DEJÁS VACÍO
End Select
If KeyAscii = 13 Then
KeyAscii = 0
busqueda = Combo1.Text & " like '" & Text16.Text & "*" & "'"
Me.Data1.Recordset.FindFirst (busqueda)
Text20.Visible = False
Text16.Visible = False
Combo1.Visible = False
Frame1.Width = 6132
Frame1.Height = 732
If Data1.Recordset.NoMatch Then
MsgBox "No se han encontrado coincidencias", vbExclamation, "¡ Atencion !"
End If
End If
End Sub
Valora esta pregunta


0