Compile Error

R

Robert Gillard

I am using Access 2003, I am trying to use a pre witten module to find no of
working days between 2 dates (excluding) holidays.
When I try to run it I get the error "Compile Error, User Definedtype not
defined"

Dim intCount As Integer
Dim rst As DAO.Recordset
Dim DB As DAO.Database

the debugger then highlites DAO.Recordset.

Could anybody help me to resolve this issue please. (as you probaly
appreciate I am not a programmer, but am trying to use a piece of code to
resolve my working days issue)

Bob
 
B

Brian

Robert Gillard said:
I am using Access 2003, I am trying to use a pre witten module to find no of
working days between 2 dates (excluding) holidays.
When I try to run it I get the error "Compile Error, User Definedtype not
defined"

Dim intCount As Integer
Dim rst As DAO.Recordset
Dim DB As DAO.Database

the debugger then highlites DAO.Recordset.

Could anybody help me to resolve this issue please. (as you probaly
appreciate I am not a programmer, but am trying to use a piece of code to
resolve my working days issue)

Bob

Open the References window (Tools menu in the code window), scroll down
until you find the Microsoft DAO 3.6 Object Library, and tick the box.
 
J

John Nurick

Hi Robert,

This probably just means that you need to add a reference to the DAO 3.6
Object Library (Tools|References in the VB editor).
 
R

Robert Gillard

I can go to Tools ok but "References" is grayed out!!

My version of Access was installed from Office Pro 2003, and I thought when
I installed it I installed all Access options.

As references is grayed out does that mean I must have missed one of the
install options or should I be looking else where to activate "References".

Sorry this presumably is quite a basic query.

Bob
 
A

Alex Dybenko

Probably you have code still running, or in break mode. run menu run-reset,
then try to open references dialog again
 
R

Robert Gillard

Sorry resolved, by going into "new" database, Reference then available to
me.

with thanks

Bob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top