Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...I've learned more from your forums in 3 days than 3 months at school and on the job combined..."

Geography

Where in the world do Tek-Tips members come from?

Form email button to automatically attach a report containing Ole logo.Helpful Member!(2) 

cimoli (TechnicalUser)
10 Jun 12 0:02
From my reading over the years, I bet this is still not possible. But maybe a 3rd party software exists? I a report "Travel Reservation" which i would like to hit an Access 2010 form button that pulls up MS Outlook (or anything you recommend) and automatically attached the report, and still keep our company logo Ole in the report, and lines, and signature Ole.

But I bet that is not possible. Any ideas?

I see this as an important item that MS did not help on, except for the Snapshot program that i read about. However, it is not feasible to ask 10,000 homeowners receiving their reservations to first download Snapshot. Or tell the Casino Hotels to do the same for our room reservation list.

I saw something called FMS but am not sure if it does what i need. Thanks you for any advice.

Helpful Member!  Lilliabeth (TechnicalUser)
10 Jun 12 11:51
Have you tried the macro action EmailDatabaseObject?
Output format should be: PDF Format (*.pdf)

Leave other fields blank except for Edit Message - leave it Yes

--Lilliabeth

cimoli (TechnicalUser)
10 Jun 12 15:04
Lilliabeth - interesting. I tried Pdf and it may work for us. I am awaiting a friend to see if he can Read the pdf attachment (without having adobe reader on his PC) and if he can print the reservation (without adobe). I have adobe on my Pc, so i need a test with someone without adobe.

if this works, then we can send emails to customers instead of regular postal mail.

The logo and lines work with Pdf.

From your message, I can try that button deal. I will let you know how i made out. thanks so much.
cimoli (TechnicalUser)
10 Jun 12 23:08
I made progress. I now have a working Email button on my Access 2010 form.
Could someone review my work? I am not a VBA person per se.
I noted in GREEN down below the command that i am not familiar with.
DoCmd.SendObject acReport, stDocName, acFormatPDF

Also, I am not sure if I should have that sendobject in more than 1 place.
You see, in my button, there are 2 possible report choices.
The ReportNum field decides which one to use for a given Hotel.

The SendObject examples on the internet were exotic with many parameters.
So I worry that I did not get this exactly right. Can you check my work?
You can criticize all you want because this coding is not my ballywick.
Thanks. Cimoli.


Private Sub cmdEmailReport_Click()
'We have 2 kinds of reports based on group or non group walkin reservations.
'1- a regular Group reservation report #10 that uses report rptTicketIND and
'2- a Splinter NON Group reservation #20 that uses report rptTicketSplinterInd.


On Error GoTo Err_cmdEmailReport_Click

Dim lResort As Long, sReportNameSpl As String, sReportNameInd As String
lResort = Me.txtResortID


'Check to see if you have a proper resort number.
If Nz(DLookup("ReportName", "tblReport", "[Resort#]=" & lResort _
& " AND [ReportNum]=20"), "") = "" Then
MsgBox "No Resort Available"
Exit Sub

Else

'Dlookup gets the splinter reservation report NAME needed for code 20.
sReportNameSpl = DLookup("ReportName", "tblReport", "[Resort#]=" & lResort _
& " AND [ReportNum]=20")
End If

'Otherwise, Dlookup gets the Group reservation for 1 person report NAME needed for code 10.
sReportNameInd = DLookup("ReportName", "tblReport", "[Resort#]=" & lResort _
& " AND [ReportNum]=10")


If Not IsNull(Forms![frmReservation]!txtSplinterDateIN) Then
DoCmd.OpenReport sReportNameSpl, acViewPreview

Else

DoCmd.OpenReport sReportNameInd, acViewPreview

'Put email send object here ?????? also need to tell it is automatically a PDF format. How?
DoCmd.SendObject acReport, stDocName, acFormatPDF

Exit_cmdEmailReport_Click:
Exit Sub

Err_cmdEmailReport_Click:
MsgBox Err.Description
Resume Exit_cmdEmailReport_Click

End If
cimoli (TechnicalUser)
11 Jun 12 0:56
I see now the 2nd place to put the DoCmd.SendObject acReport, stDocName, acFormatPDF.
I marked them in Purple below. Can someone check my work. The button seems to work.
slight delays but works in the end. Cimoli.


Private Sub RoomServiceNote_DblClick(Cancel As Integer)
RunCommand acCmdZoomBox
End Sub


Private Sub cmdEmailReport_Click()
'We have 2 kinds of reports based on group or non group walkin reservations.
'1- a regular Group reservation report #10 that uses report rptTicketIND and
'2- a Splinter NON Group reservation #20 that uses report rptTicketSplinterInd.


On Error GoTo Err_cmdEmailReport_Click

Dim lResort As Long, sReportNameSpl As String, sReportNameInd As String
lResort = Me.txtResortID


'Check to see if you have a proper resort number.
If Nz(DLookup("ReportName", "tblReport", "[Resort#]=" & lResort _
& " AND [ReportNum]=20"), "") = "" Then
MsgBox "No Resort Available"
Exit Sub

Else

'Dlookup gets the splinter reservation report NAME needed for code 20.
sReportNameSpl = DLookup("ReportName", "tblReport", "[Resort#]=" & lResort _
& " AND [ReportNum]=20")
End If

'Otherwise, Dlookup gets the Group reservation for 1 person report NAME needed for code 10.
sReportNameInd = DLookup("ReportName", "tblReport", "[Resort#]=" & lResort _
& " AND [ReportNum]=10")


If Not IsNull(Forms![frmReservation]!txtSplinterDateIN) Then
DoCmd.OpenReport sReportNameSpl, acViewPreview
DoCmd.SendObject acReport, stDocName, acFormatPDF
Else

DoCmd.OpenReport sReportNameInd, acViewPreview

'Put email send object here ?????? also need to tell it is automatically a PDF format. How?
DoCmd.SendObject acReport, stDocName, acFormatPDF

Exit_cmdEmailReport_Click:
Exit Sub

Err_cmdEmailReport_Click:
MsgBox Err.Description
Resume Exit_cmdEmailReport_Click

End If
Helpful Member!  PHV (MIS)
11 Jun 12 8:21
Replace stDocName with the corresponding sReportNameSpl and sReportNameInd

Hope This Helps, PH.
FAQ219-2884: How Do I Get Great Answers To my Tek-Tips Questions?
FAQ181-2886: How can I maximize my chances of getting an answer?

cimoli (TechnicalUser)
11 Jun 12 12:06
Yes, that works great.
I took out 2 rows since i only want to email it and not
preview it.

DoCmd.OpenReport sReportNameSpl, acViewPreview

DoCmd.OpenReport sReportNameInd, acViewPreview

thanks for all your help.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close