Dim DAO.Database - problem

  • Thread starter Thread starter Rolf Rosenquist
  • Start date Start date
R

Rolf Rosenquist

I have got an Access program that works in my computer. Some part of its
code should be used in one of my own programs, so I copied and pasted those
lines of code. But I get the error that the type is not defined. The line
that doesn't work is: 'Dim db As DAO.Database'

When in the sample program, I can define a second dim and get the DAO as
well as Database from the combo, but these two aren't there when I write the
code in my own program. Where and how should I define those two forst?

/ Rolf
 
Rolf Rosenquist said:
I have got an Access program that works in my computer. Some part of
its code should be used in one of my own programs, so I copied and
pasted those lines of code. But I get the error that the type is not
defined. The line that doesn't work is: 'Dim db As DAO.Database'

When in the sample program, I can define a second dim and get the DAO
as well as Database from the combo, but these two aren't there when I
write the code in my own program. Where and how should I define those
two forst?

/ Rolf

Ensure you have a reference to Microsoft DAO 3.6 Object Library (in VBE
- Tools | References)
 
Back
Top