D
Dominic
Hello,
I'm using Access 2002, and trying to create a recordset
object. I've Included the "Microsoft DAO" library in my
references.
I currently have a form, table and a module setup in my
database. I have used the Onload function of the form to
call a function named Setup() which has been coded in a
module. I keep on receiving the following error "Run-Time
Error 13 - Type Mismatch", when trying to Set the
recordset. This is what my module looks like:
Option Compare Database
Public db As Database
Private rst As Recordset
Option Explicit
Function Setup()
Set db = DBEngine.Workspaces(0).Databases(0)
-> Set rst = db.OpenRecordset("tblEmployee")
End Function
Any help would be appreaciated, thanks.
Dominic
I'm using Access 2002, and trying to create a recordset
object. I've Included the "Microsoft DAO" library in my
references.
I currently have a form, table and a module setup in my
database. I have used the Onload function of the form to
call a function named Setup() which has been coded in a
module. I keep on receiving the following error "Run-Time
Error 13 - Type Mismatch", when trying to Set the
recordset. This is what my module looks like:
Option Compare Database
Public db As Database
Private rst As Recordset
Option Explicit
Function Setup()
Set db = DBEngine.Workspaces(0).Databases(0)
-> Set rst = db.OpenRecordset("tblEmployee")
End Function
Any help would be appreaciated, thanks.
Dominic