Hi,
I guess, You have not Declared a Connection Object.. and you need to open Conn object
before opening the recordset...
Check this out:
'Declare this Form-Level
Dim Conn As New ADODB.Connection
'In FormLoad open the connection object:
With Conn
.ConnectionString = "Provider=Microsoft.Jet.OleDb.4.0;Data Source = C:\MyDB.mdb"
.Open
End With
You need to mention Connection object while opening recordset:
With rst
.CursorLocation = adUseClient
.ActiveConnection = Con
.CursorType = adOpenDynamic
.LockType = adLockPessimistic
SQL = "Select * from profile2 where name like '%" & Trim(fldSearch.Text) & "%'"
.Open SQL,Conn
End With
Regards
Veena
QVeen72
Veteran Poster
1,017 posts since Nov 2006
Reputation Points: 118
Solved Threads: 164
Skill Endorsements: 5
Question Answered as of 4 Years Ago by
aktharshaik,
QVeen72
and
K.Vanlalliana