473,785 Members | 2,185 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.SendObjec t 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_DataQuer y". 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 "Management Rpt" (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_Dataquer y"!

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 1315

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

Similar topics

0
2366
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 of the email My problem is that the email address is stored in a field in a table. In a MACRO, how can I put the field name in the TO value? For
8
5088
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 a virus, you should choose no." Can I do away with this message and have it send the email without user intervention? I wasn't able to find any optional parameters for the SendObject that
2
2716
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 Options. I would like to open the email client for Netscape Communicator 4.78, or Netscape 7.1. I'm not very sure, but I think calling these email clients might have something to do with dll files. I am using the following code:
1
3789
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 to automate the process, so it will cycle through each of the students without user intervention. Right now, it will 1. create the report, 2. create the E-mail (with inserted E-mail address and message), but I have to 1. Save the PDF report to...
1
1844
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 . !! Here is the code for one of them !! I call a stop function to disconnect all objects (close ) . I also make a call to Stop in the Dispose() function .
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. Hello, I've a bit of a problem with the SendObject command in VBA. On my computer when I execute the below code, a new memo is generated in Lotus Notes with an attachment labeled "Benefit Issues Log.rtf". (Benefit Issues Log is the name of the...
1
1940
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 for software currency. I have created a query that will extract selected information from a table (I have created the same query for all tables in the db because each table contains software inventory data for different areas, e.g. Unix, Intel). ...
0
1408
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", , , "Maturities", "Maturities Report attached...", False But I do lot of so-called "reports" where I'm actually creating
4
1972
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 store and purchases something. The problem is that each time SendObject sends this e-mail (Invoice) the attached file is always the same name (the name of the report, i.e. “rptInvoice” + .snp) I want the attached filename to be “Invoice” + ...
0
9646
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10350
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10157
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9957
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8983
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7505
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5386
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5518
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4055
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.