J
John Kozma
I'm fairly familiar with tables, queries, forms and reports in MS Access,
having taught a couple of classes on the subject, but now I've got a job
writing vb code for forms. I did some minor fixes on code written for an
access 2.0 project, and it converted and compiled okay in Access 2000
(version 9). However, when I tried to redesign the database from scratch,
(in part a learning project for me), I'm unable to use a recordset object.
I tried the following code:
Dim db as database 'or DATABASE or Database
Set db = DBEngine.workspaces(0).databases(0) 'or CurrentDB
so I could use the OpenRecordset method of the database object. When the
set statement executes, however, I get a type mismatch error. The same
statements are included in the code that I converted from version 2 to
version 9, but do not produce the error. The converted project includes a
util (?) module of (to me) unknown origin containing oddly named objects
that are not available for viewing. I haven't tried importing that module
into my new project, but that seems like a horrible kludge anyway (if indeed
that's even related to the problem). There must be something simpler I'm
missing. Any suggestions would be most appreciated.
John Kozma
having taught a couple of classes on the subject, but now I've got a job
writing vb code for forms. I did some minor fixes on code written for an
access 2.0 project, and it converted and compiled okay in Access 2000
(version 9). However, when I tried to redesign the database from scratch,
(in part a learning project for me), I'm unable to use a recordset object.
I tried the following code:
Dim db as database 'or DATABASE or Database
Set db = DBEngine.workspaces(0).databases(0) 'or CurrentDB
so I could use the OpenRecordset method of the database object. When the
set statement executes, however, I get a type mismatch error. The same
statements are included in the code that I converted from version 2 to
version 9, but do not produce the error. The converted project includes a
util (?) module of (to me) unknown origin containing oddly named objects
that are not available for viewing. I haven't tried importing that module
into my new project, but that seems like a horrible kludge anyway (if indeed
that's even related to the problem). There must be something simpler I'm
missing. Any suggestions would be most appreciated.
John Kozma