D
David Mc
I am trying to run some code to read data from a table
called tblUnit. However i keep getting the error message
Run-time error '13': Type mismatch and the line Set
rstUnit = dbsITAssessments.OpenRecordset("tblUnit",
dbOpenDynaset) is highlighted. Why?
I have the following modules installed (in VBA):
Visual Basic For Applications
Microsoft Access 9.0 Object Library
OLE Automation
Microsoft DAO 3.6 Object Library
ultility
My code is below:
Option Compare Database
Sub GetAssessmentInformation(strCode)
Dim dbsITAssessments As Database
Dim rstUnit As Recordset
Set dbsITAssessments = CurrentDb
Set rstUnit = dbsITAssessments.OpenRecordset
("tblUnit", dbOpenDynaset)
End Sub
Thanks
David
called tblUnit. However i keep getting the error message
Run-time error '13': Type mismatch and the line Set
rstUnit = dbsITAssessments.OpenRecordset("tblUnit",
dbOpenDynaset) is highlighted. Why?
I have the following modules installed (in VBA):
Visual Basic For Applications
Microsoft Access 9.0 Object Library
OLE Automation
Microsoft DAO 3.6 Object Library
ultility
My code is below:
Option Compare Database
Sub GetAssessmentInformation(strCode)
Dim dbsITAssessments As Database
Dim rstUnit As Recordset
Set dbsITAssessments = CurrentDb
Set rstUnit = dbsITAssessments.OpenRecordset
("tblUnit", dbOpenDynaset)
End Sub
Thanks
David