Visual basic
Publicado por marina (1 intervención) el 10/05/2003 01:29:16
Por favor ayuda necesito apoyo con un programa me marca que no reconoce el formato de la base de datos el codigo es el siguiente.
Option Explicit
Dim MIDATA As Database
Dim MIRECORD As Recordset
Private Sub cmdbusqueda_Click()
On Error Resume Next
MIRECORD.MoveFirst
Do Until MIRECORD.EOF
If txtbus.Text = MIRECORD!CmpTipo Then
lstcontacto.AddItem MIRECORD.Fields("CmpTipo")
End If
MIRECORD.MoveNext
Loop
End Sub
Private Sub cmdlimpiar_Click()
lstcontactos.Clear
txtpag.Text = ""
txtdes.Text = ""
txtnum.Text = ""
txtbus.Text = ""
txttipo.Text = ""
End Sub
Private Sub cmdsalir_Click()
End
End Sub
Private Sub Command1_Click()
Unload Form2
End Sub
Private Sub Form_Load()
Set MIDATA = OpenDatabase(App.Path + "\" + "DIRECTORIO.mdb") aqui marca el error
HORA.Text = Time
FECHA.Text = Date
MIDATA.Close
End Sub
Private Sub Image1_Click()
End Sub
Private Sub lstcontactos_Click()
On Error Resume Next
Set MIRECORD = MIDATA.OpenRecordset("TblBUSQUEDA")
MIRECORD.MoveFirst
Do Until MIRECORD.EOF
If lstcontacto.Text = MIRECORD!CmpTipo Then
txttipo.Text = MIRECORD!CmpTipo
txtpag.Text = MIRECORD!CmpPagina
txtdes.Text = MIRECORD!CmpDescripcion
txtnum.Text = MIRECORD!CmpNumero
End If
MIRECORD.MoveNext
Loop
de antemano gracias
Option Explicit
Dim MIDATA As Database
Dim MIRECORD As Recordset
Private Sub cmdbusqueda_Click()
On Error Resume Next
MIRECORD.MoveFirst
Do Until MIRECORD.EOF
If txtbus.Text = MIRECORD!CmpTipo Then
lstcontacto.AddItem MIRECORD.Fields("CmpTipo")
End If
MIRECORD.MoveNext
Loop
End Sub
Private Sub cmdlimpiar_Click()
lstcontactos.Clear
txtpag.Text = ""
txtdes.Text = ""
txtnum.Text = ""
txtbus.Text = ""
txttipo.Text = ""
End Sub
Private Sub cmdsalir_Click()
End
End Sub
Private Sub Command1_Click()
Unload Form2
End Sub
Private Sub Form_Load()
Set MIDATA = OpenDatabase(App.Path + "\" + "DIRECTORIO.mdb") aqui marca el error
HORA.Text = Time
FECHA.Text = Date
MIDATA.Close
End Sub
Private Sub Image1_Click()
End Sub
Private Sub lstcontactos_Click()
On Error Resume Next
Set MIRECORD = MIDATA.OpenRecordset("TblBUSQUEDA")
MIRECORD.MoveFirst
Do Until MIRECORD.EOF
If lstcontacto.Text = MIRECORD!CmpTipo Then
txttipo.Text = MIRECORD!CmpTipo
txtpag.Text = MIRECORD!CmpPagina
txtdes.Text = MIRECORD!CmpDescripcion
txtnum.Text = MIRECORD!CmpNumero
End If
MIRECORD.MoveNext
Loop
de antemano gracias
Valora esta pregunta


0