Compile Error

  • Thread starter Thread starter Robert Gillard
  • Start date Start date
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
 
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.
 
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).
 
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
 
Probably you have code still running, or in break mode. run menu run-reset,
then try to open references dialog again
 
Sorry resolved, by going into "new" database, Reference then available to
me.

with thanks

Bob
 
Back
Top