PC Review


Reply
Thread Tools Rate Thread

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

 
 
=?Utf-8?B?SGVucnkgSm9yZGFu?=
Guest
Posts: n/a
 
      8th Mar 2005
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

 
Reply With Quote
 
 
 
 
Dave Patrick
Guest
Posts: n/a
 
      8th Mar 2005
Open any code module, Tools|References and make sure the box is checked for
'Microsoft DAO 3.6 Object Library'

--
Regards,

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

"Henry Jordan" wrote:
| 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
|


 
Reply With Quote
 
=?Utf-8?B?SGVucnkgSm9yZGFu?=
Guest
Posts: n/a
 
      8th Mar 2005
Thank You - Solved the Problem. Suggest you add this to your next update to
Article ID # 31881 for us amateurs.

"Dave Patrick" wrote:

> Open any code module, Tools|References and make sure the box is checked for
> 'Microsoft DAO 3.6 Object Library'
>
> --
> Regards,
>
> Dave Patrick ....Please no email replies - reply in newsgroup.
> Microsoft Certified Professional
> Microsoft MVP [Windows]
> http://www.microsoft.com/protect
>
> "Henry Jordan" wrote:
> | 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
> |
>
>
>

 
Reply With Quote
 
Dave Patrick
Guest
Posts: n/a
 
      8th Mar 2005
Glad to hear it. Thanks for the feedback. There's a place at the bottom of
the article where you can make the suggestion.

--
Regards,

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

"Henry Jordan" wrote:
| Thank You - Solved the Problem. Suggest you add this to your next update
to
| Article ID # 31881 for us amateurs.


 
Reply With Quote
 
Douglas J. Steele
Guest
Posts: n/a
 
      8th Mar 2005
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


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



"Henry Jordan" <(E-Mail Removed)> wrote in message
news:AFDE49F5-A9BB-4E20-873A-(E-Mail Removed)...
> Thank You - Solved the Problem. Suggest you add this to your next update
> to
> Article ID # 31881 for us amateurs.
>
> "Dave Patrick" wrote:
>
>> Open any code module, Tools|References and make sure the box is checked
>> for
>> 'Microsoft DAO 3.6 Object Library'
>>
>> --
>> Regards,
>>
>> Dave Patrick ....Please no email replies - reply in newsgroup.
>> Microsoft Certified Professional
>> Microsoft MVP [Windows]
>> http://www.microsoft.com/protect
>>
>> "Henry Jordan" wrote:
>> | 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
>> |
>>
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
A database created in Access 2000 and 2003 shows "replica" =?Utf-8?B?WWVzR3J1bXB5?= Microsoft Access Macros 2 20th Jul 2006 07:37 PM
converting "DVD COLLECTION DATABASE" from access 2000 to 2003 =?Utf-8?B?U01IRA==?= Microsoft Access Reports 0 16th Jan 2006 12:35 AM
In Access 2000 this doesn't work" Dim db As Database" what do I u. =?Utf-8?B?Vmlja3lhdg==?= Microsoft Access Database Table Design 6 20th Nov 2004 05:39 PM
Access 2000 Please Help "Runtime error 13, type mismatch error" When using MyDB.OpenRecordset staverts Microsoft Access Forms 9 15th May 2004 08:43 AM
When compacting Access 2000 database, I lose "Everyone" from security group... Nicolae Fieraru Microsoft Access Security 1 1st Sep 2003 11:52 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:42 PM.