Hi. If anyone can give me a quick pointer before I get involved in this, I would greatly appreciate it.
I would like to automatically email data from a form in Access. My ideal outcome would be an image of the form so that the recipient sees what I see in Access.
My suspicion, from what I have read (and experienced using DoCmd.SendObject), is that this is not possible. Rather, trying to email a form will output the whole underlying table in either text or excel format.
If a form cannot be emailed in the 'as seen' format, then my next approach would be to create a report, apply an appropriate filter, and then email that report in 'Snapshot Format'.
Does anyone have any views/suggestions on this that might be of help?
13 1643
I've been able to email reports using the 'Snapshot Format' of the DoCmd.SendObject command, with one slight problem.
To send the email I do the following:
Open report
Apply filter to report
DoCmd.SendObject
However, I find that unless I put a break in the code or insert a message box before calling the SendObject command the report is mailed without having had the report filtered.
Any ideas why that might be?
Try this ... - DoCmd.SendObject acSendForm, "FormName", acFormatSNP, "EmailAddress", , , "Subject", "Msg"
Mary
Thanks, Mary. Actually, that is the code I'm using to generate the report. My real concern is twofold:
- Is there a way of emailing a report/form other than using snapshot viewer (I'm dealing with Macs and Windows)
- Why the report does not filter correctly, unless I put a msgbox prompt between the filter and the DoCmd.SendObject command.
Thanks, Mary. Actually, that is the code I'm using to generate the report. My real concern is twofold:
- Is there a way of emailing a report/form other than using snapshot viewer (I'm dealing with Macs and Windows)
- Why the report does not filter correctly, unless I put a msgbox prompt between the filter and the DoCmd.SendObject command.
When dealing with a form this is the only way I know of but someone else may have a better idea.
Not sure why the filter is causing a problem. Can you post the full code you are using.
Mary
When dealing with a form this is the only way I know of but someone else may have a better idea.
Not sure why the filter is causing a problem. Can you post the full code you are using.
Mary
Mary, I used a different approach in the end that worked. I would send you the code, but can't remember exactly what it was.
Mary, I used a different approach in the end that worked. I would send you the code, but can't remember exactly what it was.
No problem. Glad you got it working.
You may take a look at the following commands instead of a msgbox. For more details check the VBA help file. :)
DoEvents
Yields execution so that the operating system can process other events.
DBEngine.Idle
Suspends data processing, enabling the Microsoft Jet database engine to complete any pending tasks, such as memory optimization or page timeouts
You may take a look at the following commands instead of a msgbox. For more details check the VBA help file. :)
DoEvents
Yields execution so that the operating system can process other events.
DBEngine.Idle
Suspends data processing, enabling the Microsoft Jet database engine to complete any pending tasks, such as memory optimization or page timeouts
Didn't know about the second one. I'll have to remember that. Should have thought of the first one though. It's the old age catching up with me.
Mary
Didn't know about the second one. I'll have to remember that. Should have thought of the first one though. It's the old age catching up with me.
Mary
Wait in an earlier post you said you were still a spring chicken... Midlife kicking in? Maybe your just old enough to forget how old you are. ;)
Really, this forum is helping me out major I am remembering things that I had forgotten or atleast pushed into back of my head.
Wait in an earlier post you said you were still a spring chicken... Midlife kicking in? Maybe your just old enough to forget how old you are. ;)
Really, this forum is helping me out major I am remembering things that I had forgotten or atleast pushed into back of my head.
Depends on what kind of a day I've had. Today was an "I hate my clients and I don't want to be self employed anymore" kind of day. Most days I love it.
I know what you mean about retrieving info you forgot you knew.
DoEvents works a treat although, ironically, I also need the msgBox. At least I now have two ways to make it work!
DoEvents works a treat although, ironically, I also need the msgBox. At least I now have two ways to make it work!
Awesome glad to have helped. I know exactly what you are saying Mary.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: jdph40 |
last post by:
I developed a small database for my supervisor that tracks the dates
employees wish to schedule for vacation, how many days they are
eligible for, how many they have taken, etc. He asked me if it...
|
by: Brendan MAther |
last post by:
I have a table called Contact_Info. I have a form that allows me to show
all the contacts from a specified city and sector. Once these contacts
appear on my new form I would like to be able to...
|
by: Chuck |
last post by:
I have a database that has a table in it with employee information (name,
dob, email, etc). This is joined to a table that has tasks that are
assigned to each individual that has a recurring date....
|
by: Colin Anderson |
last post by:
I discovered, with great excitement, this article
http://www.davison.uk.net/vb2notes.asp when researching methods for
emailing from Access via Notes. Unfortunatly, when I run this I get a...
|
by: Dave |
last post by:
Hi,
I have found some code on the Microsoft knowledge base that 'should' allow
me to send emails and attachments
However the code tries to use Outlook and i want it to use outlook Express
...
|
by: Alfie |
last post by:
I've got a form, and I'm trying to set up a way of emailing from it.
Does anyone know, if I've got an email address in a field called
, is there a way that I could create a command button
which,...
|
by: Wayne |
last post by:
I am experiencing an intermittent problem when emailing snapshot
reports using Sendobject. Outlook opens with the snapshot of the
report attached but when I click the "Send" button on the Outlook...
|
by: Tim Hunter |
last post by:
I have two questions regarding emailing from Access.
My first question relates to how many email addresses is too much. I
have a client who wants to email 1500 people at once. Is this possible
or...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
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...
|
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...
|
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...
|
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...
| |