Discussion Locked

Access 2000 database connection

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

When trying to get access with this code in a module I get an error stating that database in the dim db as database statement is user defined. Why?

Dim db As Database
Dim rs, rs1 As Recordset
Dim x, i As Integer
Dim sql, sql2, CaseNoteNo As String
Dim AdmissionDate As Date

Set db = CurrentDb

3 replies

by karpi

Hello,

ACC2K uses ADO as default Data-Access Component.
In a Code window use the Menu Extras/References and check the 'MS DAO 3.X' library. Maybe you have to add 'DIM DBMyDatabase as DAO.Database' to avoid conflicts

HTH

Karpi

This discussion is closed to new replies.