Dim db As Database
Dim mirec As Recordset
Dim midato As String
Private Sub Dato_Change()
midato = DATO & "*"
If Option2.Value = True Then
Set mirec = db.OpenRecordset("select * from peliculas where codpelicula like '" & (midato) & "'")
Else
Set mirec = db.OpenRecordset("select * from peliculas where nombrepelicula like '" & (midato) & "'")
End If
Set Data1.Recordset = mirec
End Sub
Private Sub dato_GotFocus()
DATO.BackColor = &HC0C000
End Sub
Private Sub dato_LostFocus()
DATO.BackColor = &H80000005
End Sub
Private Sub DBGrid1_Click()
End Sub
Private Sub Form_Load()
Set db = OpenDatabase(App.Path & "\video.mdb")
Option1_Click
End Sub
Private Sub Option1_Click()
DATO.Visible = False
Set mirec = db.OpenRecordset("select * from peliculas")
Set Data1.Recordset = mirec
End Sub
Private Sub Option2_Click()
DATO.Visible = True
DATO.SetFocus
End Sub
Private Sub Option3_Click()
DATO.Visible = True
DATO.SetFocus
End Sub
Private Sub VOLVER_Click()
Unload Me
End Sub