email from recordset

S

Steve

Hi All:

I think I may be in over my head on something here. I have a database which
contaings, among other things, a table with fields for email addresses and
expiration dates. I am trying to set up something that will email a notice
to subscribers when their subscriptions are about to expire. I found the
following article at the MS Knowledge base covering this subject (sort of)
which is article number 318881.

Following the directions, I am getting this error when I debug the code:
Compile Error: User defined type not defined apparently relating to this
line of code:
Dim MyDB As Database

The only specified reference in the article is Microsoft Outlook 11.0 Object
Library, which is checked.

This has me completely baffled, so any help would be greatly appreciated.

Steve
 
J

John Nurick

Hi Steve,

This probably means that the KB code is written to use the DAO library
but your database only has a reference to the ADODB library. (Both these
have recordset objects, but only DAO has a database object.)

Go to Tools|References and add a reference to the Microsoft DAO 3.xx
object library (it's 3.60 in recent versions of Access). Then play safe
and make your code clearer by using explicit declarations, e.g.

Dim MyDB As DAO.Database
Dim rsXX As DAO.Recordset
 
S

Steve

Yep..that was it. Thanks a lot, John

Steve

Hi Steve,

This probably means that the KB code is written to use the DAO library
but your database only has a reference to the ADODB library. (Both these
have recordset objects, but only DAO has a database object.)

Go to Tools|References and add a reference to the Microsoft DAO 3.xx
object library (it's 3.60 in recent versions of Access). Then play safe
and make your code clearer by using explicit declarations, e.g.

Dim MyDB As DAO.Database
Dim rsXX As DAO.Recordset
 

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