943,551 Members | Top Members by Rank

Ad:
Jun 14th, 2005
0

Need help

Expand Post »
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.
Attached Files
File Type: zip addcust.zip (2.3 KB, 62 views)
Reputation Points: 10
Solved Threads: 0
Newbie Poster
hgim is offline Offline
1 posts
since Jun 2005
Jun 15th, 2005
0

Re: Need help

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?
Reputation Points: 10
Solved Threads: 1
Newbie Poster
hatem is offline Offline
4 posts
since Jun 2005
Jun 16th, 2005
0

Re: Need help

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.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Bharati Krishna is offline Offline
19 posts
since Aug 2004
Jun 17th, 2005
0

Re: Need help

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
Reputation Points: 10
Solved Threads: 1
Newbie Poster
hatem is offline Offline
4 posts
since Jun 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Argument Not Optional message in VB
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Macros





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC