E-Mailing a report that corresponds with the record from form

Hello,

I have a command button on a form that e-mails a report as an attachment. 
It's currently showing all records. How do I select only the record currently 
showing on the form? My report's source is the table, not a query.

Thank you so much! Laurie

Here is my code:

Private Sub E_Mail_Case_Click()
If Me.Dirty Then 'Save any edits.
Me.Dirty = False
End If
On Error GoTo Err_E_Mail_Report_Click

    Dim stDocName As String

    stDocName = "Inquiry Report"
    DoCmd.SendObject acReport, stDocName

Exit_E_Mail_Report_Click:
    Exit Sub

Err_E_Mail_Report_Click:
    MsgBox Err.Description
    Resume Exit_E_Mail_Report_Click
    
End Sub

0
Utf
8/13/2007 8:50:01 PM
access.forms 6864 articles. 2 followers. Follow

2 Replies
663 Views

Similar Articles

[PageSpeed] 5

I would have thought the easy way was tot change the source to a query based 
on your table and include parameters to filter the record you want.
Good luck
Tony
"Laurie" <Laurie@discussions.microsoft.com> wrote in message 
news:AF863F11-0803-41A7-A0D6-56A5BCD6A00F@microsoft.com...
> Hello,
>
> I have a command button on a form that e-mails a report as an attachment.
> It's currently showing all records. How do I select only the record 
> currently
> showing on the form? My report's source is the table, not a query.
>
> Thank you so much! Laurie
>
> Here is my code:
>
> Private Sub E_Mail_Case_Click()
> If Me.Dirty Then 'Save any edits.
> Me.Dirty = False
> End If
> On Error GoTo Err_E_Mail_Report_Click
>
>    Dim stDocName As String
>
>    stDocName = "Inquiry Report"
>    DoCmd.SendObject acReport, stDocName
>
> Exit_E_Mail_Report_Click:
>    Exit Sub
>
> Err_E_Mail_Report_Click:
>    MsgBox Err.Description
>    Resume Exit_E_Mail_Report_Click
>
> End Sub
> 


0
Tony
8/14/2007 11:23:35 AM
Thanks for your reply Tony.

So the user would be asked for an input value in a message box? That's fine, 
but I'm wondering if there is a more automatic way-- we don't have 
sophisticated or patient users, so the simpler and fewer steps, the better.

Laurie
 

"Tony Williams" wrote:

> I would have thought the easy way was tot change the source to a query based 
> on your table and include parameters to filter the record you want.
> Good luck
> Tony
> "Laurie" <Laurie@discussions.microsoft.com> wrote in message 
> news:AF863F11-0803-41A7-A0D6-56A5BCD6A00F@microsoft.com...
> > Hello,
> >
> > I have a command button on a form that e-mails a report as an attachment.
> > It's currently showing all records. How do I select only the record 
> > currently
> > showing on the form? My report's source is the table, not a query.
> >
> > Thank you so much! Laurie
> >
> > Here is my code:
> >
> > Private Sub E_Mail_Case_Click()
> > If Me.Dirty Then 'Save any edits.
> > Me.Dirty = False
> > End If
> > On Error GoTo Err_E_Mail_Report_Click
> >
> >    Dim stDocName As String
> >
> >    stDocName = "Inquiry Report"
> >    DoCmd.SendObject acReport, stDocName
> >
> > Exit_E_Mail_Report_Click:
> >    Exit Sub
> >
> > Err_E_Mail_Report_Click:
> >    MsgBox Err.Description
> >    Resume Exit_E_Mail_Report_Click
> >
> > End Sub
> > 
> 
> 
> 
0
Utf
8/14/2007 1:02:06 PM
Reply:

Similar Artilces:

e-mail #3
I am using Publisher 2007 and and new to using it. I have a newsletter (11"X17" with some graphics) that I print and mail bi-monthly. Is there any way I can create the same file into an e-mail in Outlook or Outlook Express? Any Ideas or suggestions for using other programs instead of those mentioned are appreciated. Papasan PDF attachment? 2007 Microsoft Office Add-in: Microsoft Save as PDF or XPS http://www.microsoft.com/downloads/details.aspx?FamilyId=4D951911-3E7E-4AE6-B059-A2E79ED87041&displaylang=en -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.m...

Crystal Reports add on to HR software
Hi All Here's the situation, i am currently working on a HR system, the report writer within the system is totally useless, and can not be used to write reports. Crystal reports has been provided, as a starting point i am trying to extract data from the system thorugh Crystal, I have connected to the file.ddf of the data ont eh system, and have to hand a dictionary containing what is held within the fields. My question is i have printed off basic reports within Crystal, however when i print the report it gives me mulitple records for memebers of staff, is there a formula or am i doing ...

Unique Records issue
Hello, I'm having some trouble formatting my spreadsheet. I have a column tha is full of customer part numbers. This row has dupilcate numbers in it Underneath most of these numbers is a blank cell (up to four deep). Th blank cells correspond to pretinent information in adjacent cell (rows). How can I return all Unique records INCLUDING the blank cell corresponding to each one (all blank cells in that column)? Ram -- Ram ----------------------------------------------------------------------- Ramy's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1653 View thi...

Top N Records minus lower scores
Hello I am a teacher and am trying to move my students grades from Excel to Access. I plan on using the Classroom management database from MS Office template, and then expanding upon that dbase as needed. One of the expansions, I am struggling with. During the semester, I will give out quizes and homeworks. I may give out 19 quizes, but I will only count 15 of those. The extra four can be dropped. In other words, the student will take all the quizes and then the lowest 4 will drop, so even though they will take 19 quizes, only 15 count toward their final grade. The ho...

=SUMPRODUCT((Data1!$B$1:$B$500="March")*(Data1!$C$1:$C$500="New York"),(Data1!$E$1:$E$500))
Hi =SUMPRODUCT((Data1!$B$1:$B$500="March")*(Data1!$C$1:$C$500="New York"), (Data1!$E$1:$E$500)) In plain english the formula above means: Sum cells E1 to E500 (last argument) if in B1 to B500 the value is "March" and if in C1 to C500 the value is "New York". SUMPRODUCT is like SUMIF on steroids and it allows you to automate all these reports that you develop with data that you import from a large centralized database, centralized accounting, manufacturing and sales programs or the Internet. The last argument (preceded by a comma) tells Excel what to...

e
e ...

Word Mail merge lables from .xls document
Office 2000 Windows XP Pro: I am trying to create Avery 8160 lables in WORD form an Excel database. . My sequence in WORD is as follows. Tools>Mail Merge>Create Main Document>Mailing Lables> Active Window>Get Data>Open Data Source. When I get to into folder that contains the .xls file the only files listed in that folder are WORD files. When I click on the File Type drop down menu at the botton of the OPEN DATA SOURCE window, the only options I have are "All Word Documents", "Word documents", "Web pages", "Rich text format", &qu...

Mailing list
I am making a mailing list of customers addresses. I own a pizzeria and at the end of the night I take the order slips and type the addresses of customers who ordered that day into microsoft word. After a few weeks of doing this I am getting a lot of repeats. How do I avoid this? If you're doing it in Word, make each address its own paragraph, select all the paragraphs, and choose Sort (Word2007: Home tab; Word2003 and earlier, Table menu [they don't need to be in a table]). Then when you want to add a new one, just go to where it would fit in and see if it's alrea...

How do I block messages from one particular e-mail adress?
I dont want to receive e-mails from one certain adress. Is it possible to block those messages? yes. right click an email from them, Junk mail, add to junk senders list -- Regards Judy Gleeson MVP Outlook www.judygleeson.com www.deskdoctors.com Are you sick of bad email practice? Get a copy of my paper "Implementing Email Policy" from the Desk Doctors website. "Marco" <Marco@discussions.microsoft.com> wrote in message news:9517F371-5BC9-46D6-8979-9FB489585258@microsoft.com... >I dont want to receive e-mails from one certain adress. Is it...

Information from table to report.
I recently created a report using a query. The query draws its information from a table. One of the field in the table has a drop down box with the options "Yes" and "No". If the option "yes" is selected, it shows on the table and in the corresponding query. However, it does not appear in the report. There appears to be a blank in the report where the work "Yes" is meant to be. I tried deleting the field from the report and adding it again, anf i also tried moving it around on the report to make sure it was not hidden. But that did not help. What ...

Linking Data from Main Form to Subform
I have created a main form with 4 combo boxes. When data is typed or selected in one of these combo boxes, how do I make it so the information using the selected in the combo boxe show up in my subform. Thanks -- tmdrake On Mon, 29 Oct 2007 09:16:01 -0700, tmdrake <tmdrake@discussions.microsoft.com> wrote: >I have created a main form with 4 combo boxes. When data is typed or >selected in one of these combo boxes, how do I make it so the information >using the selected in the combo boxe show up in my subform. > >Thanks It's not one of the options that the wiz...

i dont no how to send a mail could u plz tell me wot to click on
help plzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz What do you mean by "send a mail" ? Could you please keep the subjects brief and explain what you would like in as much details as possible please -- iPod's ROCK! "marjan" wrote: > help plzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz ...

How to forward mail from internalmail to external address?
I have internal is user@mydomain.com and want to forward this address to user@hotmail.com in MS-Exchange2003. How can i do? Ask your Exchange administrator to set up a mail-enabled contact for your hotmail account, and use alternate delivery/delivery options on the user@mydomain.com mailbox to send a copy of all inbound mail to the mail-enabled contact. Mark Thailand wrote: > I have internal is user@mydomain.com and want to forward this address > to user@hotmail.com in MS-Exchange2003. How can i do? Mark Thailand <mark@wctcoltd.com> wrote: > I have internal is user@mydomai...

out look mail
How do I get my out look mail back to my schools imail accout? On Thu, 22 Apr 2010 14:08:29 -0700, "Donna" <w1239881@imail.losrios.edu> wrote: >How do I get my out look mail back to my schools imail accout? > Ask your school email administrator. Nobody on this volunteer-staffed technical support forum for Microsoft Access databases will be able to help you. You'll also want to change your email address; it's now been published to tens of thousands of computers worldwide, and spammers and junk mailers can and will harvest it to send you SPAM....

Auto-response e-mail: Generate auto-response e-mail to
How to set-up next feature Auto-response e-mail: Generate auto-response e-mail to customer requests. (MS CRM Overview from MBS site) Ed I have not seen an auto-response feature in CRM. "ed" <anonymous@discussions.microsoft.com> wrote in message news:0bac01c3b4e3$2ca0d6e0$a101280a@phx.gbl... > How to set-up next feature > Auto-response e-mail: Generate auto-response e-mail to > customer requests. (MS CRM Overview from MBS site) > ...

Attachments in a mail merge document
HI I am trying to do an e-mail merge from Microsoft word. I have been successful with just formatted text. I would like to however, send an attachment along with these emails. I have tried various methods to achieve this, but have not been successful. Can someone please point me in the right direction? Is Outlook 2002 (XP) capable of doing an e-mail merge with attachments? regards, Andrew No. You would have to use a 3rd party mass mailing program if you need to send attachments. Look here for a list of possible programs: http://www.slipstick.com/addins/mail.htm#massmail -- ...

URGENT: Mail access issues
Hello: I am having a problem logging into my Outlook mail account on my laptop. I get the following error: "Your logon information was incorrect. Check your username and domain, then type your password again. If your account is new or if your administrator requested a password change you need to click Change Password then logon with your new password." Seems like a straight-forward message, but here is the problem. I can access my mail account when logging on to the client's desktop computer. I should be able to logon to this account from my laptop, just like my co...

A program is trying to automatically send e-mail on your behalf...
I'm using Outlook 2002 and a UK Accounts package called Sage. This package allows me to send invoices via email. Everytime I send an email I have to wait 5 seconds before I can click YES, and if I have a lot of invoices to send, this does take quite some time. Is there a way to "override" this setting so that it sends them automatically without asking me? I know the security reasons why this feature is there, its just a hinderance thats all. I do have uptodate virus checking on my emails that will hopefully catch worm viruses trying to send without my knowledge. Anyway, I h...

Report on select general ledger accounts, that are not sequential.
There are many time when we need to review specific general ledger accounts. These accounts are not necessarily in sequential order, therefore we have to print much more than is needed or may separate reports. It would be helpful if a detail/summary trial balance report could be generated, using some type selection criteria other than account number,segment or date. Example: We have multiple general ledgers that relate to mortgages. These accounts can be income, expense, assets, etc. They cover a large range of general ledger numbers. I'd like to pull all accounts related to mort...

P L E A S E
Please, could someone help me with "DLL (Resource)" post (some 25 posts below this post). Please. Thank you. "Jan Plastenjak" <none@ms.com> wrote in message news:ewOtE0A3DHA.2700@tk2msftngp13.phx.gbl... > > Please, could someone help me with "DLL (Resource)" post (some 25 posts > below this post). Please. What? I'm to search through the newsgroup looking for find your post? I don't think so... Cheers Richard. Jan, I have already answered your post, let me repeat it: "If you go to www.microsoft.com and enter the fo...

How do you sort 2 date fields in assending order (query or report)
I have 2 DOB fields (client and spouse) in a table that I currently print off the birth month and call them on their b-day. I really wish I could figure out how to get them to print/display in assending order of date (ie: 11/1 followed by 11/2) even if the spouse is before the client. Is this possible without having to do a bunch of programming? Thanks! Yep. Use a calculated field like this -- DOB_Sort: IIF([Client_DOB]<[Spouse_DOB], [Client_DOB], [Spouse_DOB]) -- Build a little, test a little. "KnowEnough2BDangerous" wrote: > I have 2 DOB fiel...

New Mail Desktop Shortcut
Is there a desktop shortcut for creating a new mail message (running Windows XP)? In Windows 2000 there was a shortcut bar with a new mail message icon on it. I'm wondering if there's something similar in XP? Rob D. <RobD@discussions.microsoft.com> wrote: > Is there a desktop shortcut for creating a new mail message (running > Windows XP)? In Windows 2000 there was a shortcut bar with a new > mail message icon on it. I'm wondering if there's something similar > in XP? It's easy enough to make one. Open Outlook and search for "command line&qu...

E-Mail Printing Problem
I posted this problem 6 or 8 months ago and have not yet seen a solution. The problem is on certain emails (Schwab Confirms as an Example) about 1" of the right side of the email is cropped. I documented and reported the problem to MSFT and someone from MSFT replied that they were aware of the issue and were working on it. That was many many months ago. The problem is/was not printer dependent or operating system dependant - just Internet Explorer and/or Windows Live Mail. It was apparent at that time that other people were experiencing the same problem. Is anyone aware...

Issue with ADP form bound to Stored Procedure
I have an application that I support that is a Microsoft Access Database Project. It uses Access as a front end to a SQL Server database (SQL Server 2000). The current version of Access used in production is Access 2000 (Office 2000). My application site will be receiving new workstations next week that run Access 2002 (Office 2002/XP). When testing with the new version of Access we discovered an issue with one of the Access forms being bound to a Stored Procedure as its data source. It uses the following code to do this Me.RecordSource = "dbo.proc_frm_Input Me.UniqueTable = "d...

Unable to send via windows mail
Hi everyone, I am having trouble sending via windows mail, one day it was working and then for some reason it doesnt. I can still received email but unable to send. I have all correct settings, I have deleted accunt and re installed account, changed port settings as requested and still get the same error. which is the following The message could not be sent. The authentication setting might not be correct for your outgoing e-mail [SMTP] server. For help solving this problem, go to Help, search for "Troubleshoot Windows Mail", and read the "I'm having problems ...