You are trying to set the variable "con" to be a new connection. It is defined as a Recordset object.
BitBlt
Practically a Posting Shark
894 posts since Feb 2011
Reputation Points: 482
Solved Threads: 148
Skill Endorsements: 14
Hi,
Change the code to:
Dim RS As New Adodb.Recordset
Dim con As New Adodb.Connection
Private Sub mygdb()
Set con = New Adodb.Connection
con.CursorLocation = adUseClient
con.Open "PROVIDER = Microsoft.Jet.OLEDB.4.0;Data Source =" _
& App.Path & "\enrolment.mdb;"
End Sub
Regards
Veena
QVeen72
Veteran Poster
1,017 posts since Nov 2006
Reputation Points: 118
Solved Threads: 164
Skill Endorsements: 5