I need help to create a delete form and search for the banking system. I have created a add form for the users now i need to create delete and search form for the project. i have put the codes inside the attachment of the zip file. thanks.

hello,
you can use the seek command that will allow you to search for a certain value of data inside your database.
but do not worry i will post you a full code description next time. :) .
but i just wanna give an advise :
try to use much more meanfull names for your items, for example :
CmdExit for your Exit button instead of command3 and CndSave for your Save Button instead of command2. because once your project gets bigger and bigger it will be much more easier to follow up when using meanfull names.
got the idea?

Hi,

You can also develop the code for add, modify and delete the records from one form. Try this book Titled:" Develop an accounting package using vb ".

It should help you out.

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 :)

This article has been dead for over six months. Start a new discussion instead.