Visual basic
Disculpa pero tengo problemas en un programa este es el código, me puedes ayudar. Me idica que no se reconoce el formato de la base de datos, este es el código
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
End Sub
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
End Sub
De antemano gracias
1 respuesta
Respuesta de citef
1