ok as i promised you here it is.
Data1.Recordset.MoveFirst
Do Until Data1.Recordset.EOF
If Data1.Recordset!Name = datatofind Then
Data1.Recordset.Delete
Data1.Refresh
Exit Do
End If
Data1.Recordset.MoveNext
Loop
where "datatofind" is a varaible that contains the data you wanna delete.
"data1" is your data object that is connected to the database.
"Name" is the field you are proccessing.
you can use the same code to display search results by replacing Data1.Recordset.Delete
by the appropriate lines of code.
and another thing:
inatead of doing this:
Public Sub cleaall()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text10.Text = ""
Text11.Text = ""
Image1.Picture = LoadPicture("")
Frame1.Enabled = False
Command1.SetFocus
End Sub
try that:
Public Sub cleaall()
For Each ctl In Controls
If TypeOf ctl Is TextBox Then
ctl.Text = ""
End If
Next ctl
Image1.Picture = LoadPicture("")
Frame1.Enabled = False
Command1.SetFocus
End Sub
i hope this helps :)