Check your references, chances are that you're missing the reference to the
DAO Library. Open the module in the Visual Basic Editor (VBE) then click
Tools->References. Make sure that the Microsoft DAO 3.x Object Library is
checked. You might also want to check this article details and info on how
to fix the problem:
http://www.mvps.org/access/bugs/bugs0031.htm
--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this newsgroup.
Alberto Uttranadhie wrote:
> Hi, everybody,
>
> At my home and at the office I have the same version of Access (i.e.,
> 2000). But, when working at home I can declare variables as
> DAO.Recordset, but it is not possible at office (only As Recorset is
> available).
>
> Should I think this is a problem of non complete Access installation
> (at two places a complete installation was done) or it is related to
> Windows operating system versions (at home I work with Windows ME,
> and with Windows 2000 at office)?
>
> Maybe it is a nonsense question, but I have big problems with it. As
> always, thanks in advance.
>
> Alberto Uttranadhie (Spain)