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 think this forum rocks it has saved my bacon many many times..."

Geography

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

Why is the Email invoice report is blank but Print Preview is just fine.Helpful Member! 

cimoli (TechnicalUser)
27 Jun 12 11:19
I have had success making email buttons. But not this one. I have 2 buttons on the Invoice form. One to print preview or go to the printer. The newer one is for an email.

The email address gets into the MS Outlook "TO" just fine. The PDF gets into the attachment just fine.

However, the PDF content has only the report formatting etc except there is NO DATA in the report. See the email button ON Click below:

(PS - where you see "Name" txtOrderID, I original used the Control Source OrderID. But i got the same problem either way. The report button did not seem to care either if i used txtOrderID or OrderID. i wonder which is best: the name or the control name?)

In the query Qry8700Invoice for the rpt8700Quote, I have a criteria in the OrderID field of: [Forms]![frm8700OrdersMain]![txtOrderID]

Just in case you needed to know. Again, the report button works fine. It gets previews the proper invoice. But the Mail Button will only show an invoice format with no data.
I don't get it.

Thanks, Cimoli and Glen


'------ here is the email button ON CLICK ------------
Private Sub cmdPrintEmail_Click()

On Error GoTo Err_cmdPrintEmail_Click

Dim strDocName As String
Dim strWhere As String

strWhere = "OrderID = " & Me.txtOrderID
strDocName = "rpt8700Quote"

DoCmd.SendObject acReport, strDocName, acFormatPDF, Me!cboEmail22

Exit_cmdPrintEmail_Click:
Exit Sub

Err_cmdPrintEmail_Click:
' If action was cancelled by the user, don't display an error message.
Const conErrDoCmdCancelled = 2501
If (Err = conErrDoCmdCancelled) Then
Resume Exit_cmdPrintEmail_Click
Else
MsgBox Err.Description
Resume Exit_cmdPrintEmail_Click
End If

End Sub
dhookom (Programmer)
27 Jun 12 12:53
I would use code to modify the SQL property of the query Qry8700Invoice so the actual value was substituted for the control reference in the criteria.

Duane
Hook'D on Access
MS Access MVP

cimoli (TechnicalUser)
27 Jun 12 16:33
Hi Duane. I am not sure how to handle what you said. If possible, could you or someone take a peek at an attached mini TEST file (just 1.6 mb)that i made?

My method so far is to fill out the order. Then i click on the RED email pick and get an email address. Then i hit the email button at the top black right area. Next to the Print button.

The Print button works fine. I get the proper invoice to view and print.

But the email button only gives me an invoice style but with ZERO data.

I almost had it. thank you in advance. Cimoli glen
cimoli (TechnicalUser)
27 Jun 12 17:13
My goal after the one above is to learn how to pick Multiple emails for the given one Order. Just a thought.
Helpful Member!  dhookom (Programmer)
27 Jun 12 21:34
I can't and won't download a file. Do you understand what I mean by changing the SQL property of a saved query? I have code at FAQ701-7433: How to Change SQL property of saved query (DAO).

Duane
Hook'D on Access
MS Access MVP

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