Error using SendObject after conversion from Access97 to Access200

D

David

Hi -

I use the SendObject method in two places (at least) for emailing order
status infomation to my customers and to vendors who do order fulfillment.

AFter converting the database to Access2003, the routine that sends an email
to a customer still works, but the one that emails very similar info to a
vendor bombs at the SendObject staement with the error "An expression you
entered is the wrong data type for one of the arguments" (I had to set
breakpoints to see where it was bombing, since the error is so vague)

Both routines (the one that works and the one that no longer works) build a
string called Orderstr containing all the pieces of text that will comprise
the body of the email.

The version that works is
DoCmd.SendObject acSendNoObject, , acFormatTXT, Me![BTEmail], , ,
"Weborder" & Me![OrderID], Orderstr, True

The one that bombs is
DoCmd.SendObject acSendNoObject, , acFormatTXT, Vendors!,
Vendors![CCEmail], , "Weborder" & Me![OrderID], Orderstr, True

The only significant difference I can imagine is that Orderstr is most
likely somewhat longer in the vendor email because I send more info about the
order to the vendor, but both would be significantly longer than 256 bytes.

Does anyone have any ideas that could help me resolve this?

Thanks a lot,
Dave
 
D

David C. Holley

Try taking out the CCEmail and see if it works given that that's the
only difference I would venture that the problem lies with there. I
would also play with the Vendors! and Vendors![CCEmail] by
replacing them with hardcoded values, first one and then the other.
 
D

david epsom dot com dot au

SendObject was broken in Access 2000, and I think fixed
only in the final bug fix version - Access 2002. Sometimes
failed when doing repeated sends, and sometimes failed
when the body of text was longer than some very small
number of characters.

(david)
 

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