473,513 Members | 2,291 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Sendobject Refuses To Use Given Object Name

Can anyone please help me with the following madness in Access 2003
(2000 file format). I am using 2 similar funtions, the first which
works fine to save reports as snapshots:

On Error Resume Next
DoCmd.OutputTo A_REPORT, Forms!FrontPage!RptName, "Snapshot Format
(*.snp)", , False

and the second which is giving me the problem, to email reports as
snapshots:

'On Error Resume Next
DoCmd.SendObject acSendReport, Forms!FrontPage!RptName, "Snapshot
Format"
End Function

Both these functions are linked to appropriate buttons on a custom
menu bar.

When opened,the reports that are either being saved or sent as email
attachments send their report names to the Forms!Frontpage!RptName
textbox which is then used as the object name in the functions.

For a reason which is beyond me the second function refuses to name
the attached report in Outlook to the name I am giving it from the
textbox and instead names it using the name of a totally unrelated
query in my database, "Q_DataQuery". If I delete the query from the
database, it still uses its name.

If I rename the Forms!Frontpage!RptName textbox to
Forms!Frontpage!RptName2 the function produces an error (as expected)
saying that it can't find the textbox, so it is definitely looking at
the textbox to get the object name, but then not using that name as
the email attachment name. If I use "ManagementRpt" (one of the
report names) as the object name in the function and try to attach
that report to an email, the report name in the email is still
"Q_Dataquery"!

Added to all this, I have to push the "Send" button in Outlook 2003
twice in fairly quick succession to get the email to send.

Either I've really missed something or there's a major bug here
somewhere. Any help would be appreciated.
Nov 13 '05 #1
0 1300

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2340
by: Bret Shortall | last post by:
Using the SENDOBJECT action command in a Macro works fine if you hard code in their email address. SENDOBJECT TO bret@emailaddress.com SUBJECT This is the Subject line...
8
5053
by: Andy Kasotia | last post by:
Warning message in Outlook 2003 while using SendObject. When i try to use sendobject to send an email, a warning massage pops up, saying that "Outlook is trying to send an email.......if this is...
2
2701
by: Marcus | last post by:
Is there a way to have Access 2002 open a particular email client, when using DoCmd.SendObject? So far, Access simply opens the default email client that is set under Control Panel/Internet...
1
3774
by: AJ | last post by:
I have a student registration database, that prints a report to PDF. I am using the sendObject method to create an E-mail and write THAT student's registration to a report for him. I am trying...
1
1831
by: Ebrahim | last post by:
This message is in reply to a prev 1 . My application refues to close . Some one had suggested that I might have threads running.. but i solved that problem too . The app still refuses to close...
2
846
by: Andy_Khosravi | last post by:
I posted this question about two days ago, but for some reason it never actually got put up. I couldn't' find it with searches, so I am re-posting it now. I apologize if this is a double post. ...
1
1929
by: Laura Pouliot | last post by:
Background: I am new to MS Access. I have created a db which contains software inventory information. I would like to utilize a field in the db that contains email addresses of people responsible...
0
1397
by: (PeteCresswell) | last post by:
Another thread got me going on SendObject. Works like a champ for emailing somebody a .SNP of a report as in: DoCmd.SendObject acSendReport, "rptMaturities", "Snapshot Format", "pCresswell", ,...
4
1960
by: Ken OHanlon | last post by:
I have an Access 2003 question. It is about using SendObject and/or OutputTo. I want to be able to send an e-mail (Invoice) to my customer each and every time one of his employees comes into the...
0
7269
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7394
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7123
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5701
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5100
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4756
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3237
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
811
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
470
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.