Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / March 2005

Tip: Looking for answers? Try searching our database.

Access VBA Statement (Access 2000 - Vb 6.0) "Dim MyDB As Database"

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Henry Jordan - 08 Mar 2005 15:11 GMT
I am trying to implement Article ID 31881 -How to use a record set to send
Outlook e-mail to multiple receipients in Microsoft Access.

I have copied the code suggested into a new module. However the compiler
does not like the first statement. (Access 2000, VB 6.0)

Dim MyDB As Database

The second statement is accepted!

Dim MyRS As Recordset

It looks like the "As Database" is not acceptable.

Can anyone help me as to what is incorrect in VB
Dave Patrick - 08 Mar 2005 15:25 GMT
Open any code module, Tools|References and make sure the box is checked for
'Microsoft DAO 3.6 Object Library'

Signature

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

| I am trying to implement Article ID 31881 -How to use a record set to send
| Outlook e-mail to multiple receipients in Microsoft Access.
[quoted text clipped - 11 lines]
|
| Can anyone help me as to what is incorrect in VB
Henry Jordan - 08 Mar 2005 16:11 GMT
Thank You - Solved the Problem. Suggest you add this to your next update to
Article ID # 31881 for us amateurs.

> Open any code module, Tools|References and make sure the box is checked for
> 'Microsoft DAO 3.6 Object Library'
[quoted text clipped - 14 lines]
> |
> | Can anyone help me as to what is incorrect in VB
Dave Patrick - 08 Mar 2005 16:22 GMT
Glad to hear it. Thanks for the feedback. There's a place at the bottom of
the article where you can make the suggestion.

Signature

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

| Thank You - Solved the Problem. Suggest you add this to your next update to
| Article ID # 31881 for us amateurs.
Douglas J. Steele - 08 Mar 2005 23:48 GMT
Just a comment. It's not quite as simple as that.

If you're not going to be using ADO, uncheck the reference to Microsoft
ActiveX Data Objects 2.1 Library when you add the reference to DAO.

If you have both references, you'll find that you'll need to "disambiguate"
certain declarations, because objects with the same names exist in the 2
models. For example, to ensure that you get a DAO recordset, you'll need to
use Dim rsCurr as DAO.Recordset (to guarantee an ADO recordset, you'd use
Dim rsCurr As ADODB.Recordset)

The list of objects with the same names in the 2 models is Connection,
Error, Errors, Field, Fields, Parameter, Parameters, Property, Properties
and Recordset

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

> Thank You - Solved the Problem. Suggest you add this to your next update
> to
[quoted text clipped - 21 lines]
>> |
>> | Can anyone help me as to what is incorrect in VB
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.