LIS 558 - Visual Basic Annoyances
Visual Basic does not always work as advertised.
This page is intended to describe some problems
that you may encounter
and to suggest possible alternatives.
More items may be added as the course progresses.
Problems with the Database and
When creating a new database in Access,
you may find that the Database object type
is not recognized by the Visual Basic compiler.
There are at least two different ways of dealing with this
- use the Variant type
instead of the Database type
in your Dim statement,
- click on "References" in the "Tools"
and check the box for "Microsoft DAO 3.6 Object
in the list that appears.
When creating a new database in Access 2000,
you may find that the Visual Basic compiler makes a mess
of the Recordset type;
for example, the NoMatch property is not recognized
and the OpenRecordSet method
is not seen as returning a Recordset object.
To avoid this bug,
use the Variant type
instead of the Recordset type
in your Dim statement.
Last updated July 5, 2001.
This page maintained by
Prof. Tim Craven
E-mail (text/plain only): firstname.lastname@example.org
Faculty of Information and
University of Western
Canada, N6A 5B7