PC Review


Reply
Thread Tools Rate Thread

Automation objects

 
 
Alain
Guest
Posts: n/a
 
      14th Jul 2004
Hi to all, I am getting the following error that I do not
quite understand error 2471 "Tho object doesn't contain
the automation object [txtVendorID

this is the code I am using
num6 = DSum("[Montant]", "account", "[VendorId] =
[txtVendorID]")
Forms![MPD Corrector]![txtTotVendorID] = num6
I have checked my refewrences and the OLE Automation is
checked, Microsoft ActiveX Data Objects Library 2.7 is
also checked.

Can anyone tell me what I am doing weong

Many thanks in advance

Alain
 
Reply With Quote
 
 
 
 
Douglas J. Steele
Guest
Posts: n/a
 
      14th Jul 2004
The problem is that because you've put [txtVendorID] inside the quotes.

Try:

num6 = DSum("[Montant]", "account", "[VendorId] = " & [txtVendorID])

assuming VendorId is numeric, or

num6 = DSum("[Montant]", "account", "[VendorId] = " & Chr(34) &
[txtVendorID] & Chr(34))

if it's text.

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


"Alain" <(E-Mail Removed)> wrote in message
news:2d58e01c469b9$65a73660$(E-Mail Removed)...
> Hi to all, I am getting the following error that I do not
> quite understand error 2471 "Tho object doesn't contain
> the automation object [txtVendorID
>
> this is the code I am using
> num6 = DSum("[Montant]", "account", "[VendorId] =
> [txtVendorID]")
> Forms![MPD Corrector]![txtTotVendorID] = num6
> I have checked my refewrences and the OLE Automation is
> checked, Microsoft ActiveX Data Objects Library 2.7 is
> also checked.
>
> Can anyone tell me what I am doing weong
>
> Many thanks in advance
>
> Alain



 
Reply With Quote
 
Guest
Posts: n/a
 
      14th Jul 2004
I have tried your solution but getting a different error
" External name not defined"
I have tried also different syntax but still getting
other errors

BTY VendorId is numeric


>-----Original Message-----
>The problem is that because you've put [txtVendorID]

inside the quotes.
>
>Try:
>
>num6 = DSum("[Montant]", "account", "[VendorId] = " &

[txtVendorID])
>
>assuming VendorId is numeric, or
>
>num6 = DSum("[Montant]", "account", "[VendorId] = " & Chr

(34) &
>[txtVendorID] & Chr(34))
>
>if it's text.
>
>--
>Doug Steele, Microsoft Access MVP
>http://I.Am/DougSteele
>(No private e-mails, please)
>
>
>"Alain" <(E-Mail Removed)> wrote in

message
>news:2d58e01c469b9$65a73660$(E-Mail Removed)...
>> Hi to all, I am getting the following error that I do

not
>> quite understand error 2471 "Tho object doesn't

contain
>> the automation object [txtVendorID
>>
>> this is the code I am using
>> num6 = DSum("[Montant]", "account", "[VendorId] =
>> [txtVendorID]")
>> Forms![MPD Corrector]![txtTotVendorID] = num6
>> I have checked my refewrences and the OLE Automation is
>> checked, Microsoft ActiveX Data Objects Library 2.7 is
>> also checked.
>>
>> Can anyone tell me what I am doing weong
>>
>> Many thanks in advance
>>
>> Alain

>
>
>.
>

 
Reply With Quote
 
Douglas J. Steele
Guest
Posts: n/a
 
      14th Jul 2004
What is txtVendorID? A variable or a control on the form? If the latter, try
Me.txtVendorID

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



<(E-Mail Removed)> wrote in message
news:2c31301c469c3$e40d69c0$(E-Mail Removed)...
> I have tried your solution but getting a different error
> " External name not defined"
> I have tried also different syntax but still getting
> other errors
>
> BTY VendorId is numeric
>
>
> >-----Original Message-----
> >The problem is that because you've put [txtVendorID]

> inside the quotes.
> >
> >Try:
> >
> >num6 = DSum("[Montant]", "account", "[VendorId] = " &

> [txtVendorID])
> >
> >assuming VendorId is numeric, or
> >
> >num6 = DSum("[Montant]", "account", "[VendorId] = " & Chr

> (34) &
> >[txtVendorID] & Chr(34))
> >
> >if it's text.
> >
> >--
> >Doug Steele, Microsoft Access MVP
> >http://I.Am/DougSteele
> >(No private e-mails, please)
> >
> >
> >"Alain" <(E-Mail Removed)> wrote in

> message
> >news:2d58e01c469b9$65a73660$(E-Mail Removed)...
> >> Hi to all, I am getting the following error that I do

> not
> >> quite understand error 2471 "Tho object doesn't

> contain
> >> the automation object [txtVendorID
> >>
> >> this is the code I am using
> >> num6 = DSum("[Montant]", "account", "[VendorId] =
> >> [txtVendorID]")
> >> Forms![MPD Corrector]![txtTotVendorID] = num6
> >> I have checked my refewrences and the OLE Automation is
> >> checked, Microsoft ActiveX Data Objects Library 2.7 is
> >> also checked.
> >>
> >> Can anyone tell me what I am doing weong
> >>
> >> Many thanks in advance
> >>
> >> Alain

> >
> >
> >.
> >



 
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
Automation of COM objects in Excel Alex Wykel Microsoft Excel Programming 0 28th Jul 2008 11:58 PM
Automation Lotus 1-2-3 Objects =?Utf-8?B?am9yZGlnYXJk?= Microsoft Excel Programming 1 28th Jul 2005 08:46 AM
RE: Automation Objects =?Utf-8?B?RGVyZWsgV2l0dG1hbg==?= Microsoft Access VBA Modules 0 8th Nov 2004 08:19 PM
Re: Automation Objects John Nurick Microsoft Access VBA Modules 3 23rd Jul 2004 10:10 PM
Automation Error w/ Objects Trent Argante Microsoft Access Macros 7 8th Nov 2003 04:01 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:45 PM.