943,829 Members | Top Members by Rank

Ad:
Sep 15th, 2005
0

Code for Find First ...

Expand Post »
Hi, friends!

Could somebody tell me what code should be written for the following buttons to search the database ( I am using ADODC CONTROL) :

Find First
Find Previous
Find Next
Find Last

I will be grateful for any response...
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
user777 is offline Offline
19 posts
since Jul 2005
Sep 15th, 2005
0

Re: Code for Find First ...

Dim Conn As ADODB.Connection
Dim rs As ADODB.Recordset
Set Conn = New ADODB.Connection
Set rs = New ADODB.Recordset
conn.open {Connection String}
rs.Open "Select * FROM TABLE;", Conn, 3, 3, 1

use only one of tehse under each correct button

rs.MoveFirst
rs.MovePrevious
rs.MoveNext
rs.MoveLast
Reputation Points: 20
Solved Threads: 5
Junior Poster
jwshepherd is offline Offline
123 posts
since Jun 2005
Sep 17th, 2005
0

Re: Code for Find First ...

Quote originally posted by jwshepherd ...
Dim Conn As ADODB.Connection
Dim rs As ADODB.Recordset
Set Conn = New ADODB.Connection
Set rs = New ADODB.Recordset
conn.open {Connection String}
rs.Open "Select * FROM TABLE;", Conn, 3, 3, 1

use only one of tehse under each correct button

rs.MoveFirst
rs.MovePrevious
rs.MoveNext
rs.MoveLast
-------------------------------------------------------------------

Dear Sir,

Thanks for your kind reply. Could you please do me a another favour. Since I dont know where this code goes so I am sending this program in a zip format please modify it and send it back. Sorry to give you trouble.

Have a nice day.
Attached Files
File Type: zip CONTACTS.zip (17.3 KB, 39 views)
Reputation Points: 10
Solved Threads: 0
Newbie Poster
user777 is offline Offline
19 posts
since Jul 2005
Sep 17th, 2005
0

Re: Code for Find First ...

Quote originally posted by jwshepherd ...
Dim Conn As ADODB.Connection
Dim rs As ADODB.Recordset
Set Conn = New ADODB.Connection
Set rs = New ADODB.Recordset
conn.open {Connection String}
rs.Open "Select * FROM TABLE;", Conn, 3, 3, 1

use only one of tehse under each correct button

rs.MoveFirst
rs.MovePrevious
rs.MoveNext
rs.MoveLast
----------------------------------------------------------------
Could you please re-write the code for me since I am a bit confused.

database path is : C:\CONTACTS (THE FOLDER NAME & DATABASE NAME ARE SAME I.E. CONTACTS)
table name is : CUSTOMERS

Thanks for any help.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
user777 is offline Offline
19 posts
since Jul 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: Print Screen
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Auto Calculation





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


Follow us on Twitter


© 2011 DaniWeb® LLC