473,405 Members | 2,167 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Is there a way of automatically emailing a form as it appears in access

119 100+
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?
Mar 14 '07 #1
13 1643
billelev
119 100+
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?
Mar 15 '07 #2
MMcCarthy
14,534 Expert Mod 8TB
Try this ...

Expand|Select|Wrap|Line Numbers
  1. DoCmd.SendObject acSendForm, "FormName", acFormatSNP, "EmailAddress", , , "Subject", "Msg"
Mary
Mar 17 '07 #3
billelev
119 100+
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.
Mar 19 '07 #4
MMcCarthy
14,534 Expert Mod 8TB
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
Mar 22 '07 #5
billelev
119 100+
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.
Mar 27 '07 #6
MMcCarthy
14,534 Expert Mod 8TB
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.
Mar 27 '07 #7
Denburt
1,356 Expert 1GB
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
Mar 27 '07 #8
MMcCarthy
14,534 Expert Mod 8TB
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
Mar 27 '07 #9
Denburt
1,356 Expert 1GB
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.
Mar 27 '07 #10
MMcCarthy
14,534 Expert Mod 8TB
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.
Mar 27 '07 #11
billelev
119 100+
DoEvents works a treat although, ironically, I also need the msgBox. At least I now have two ways to make it work!
Mar 28 '07 #12
Denburt
1,356 Expert 1GB
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.
Mar 28 '07 #13
billelev
119 100+
Awesome glad to have helped. I know exactly what you are saying Mary.
Denburt, have you seen my post about Access hanging?

http://www.thescripts.com/forum/thread623574.html

I am wondering whether it is caused by a similar issue....
Mar 28 '07 #14

Sign in to post your reply or Sign up for a free account.

Similar topics

2
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...
9
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...
2
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....
5
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...
30
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 ...
1
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,...
2
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...
2
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...
0
BarryA
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...
1
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...
0
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...
0
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
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...
0
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...
0
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
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...
0
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...

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.