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...

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

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.

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.