Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Is it possible to send a fax with a command button on a form?

Posted on 2013-02-07
16
Medium Priority
?
260 Views
Last Modified: 2013-02-07
I have a form which has a command button.  When the button is clicked I want a report to be faxed.  Is this possible?
0
Comment
Question by:SteveL13
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 8
16 Comments
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 38864716
Sure, but are you saying that Emailing the report (Much Simpler) is not an option?

DoCmd.SendObject acSendReport, "YourReport", acFormatPDF, "Somebody@email.com", , , "YourSubject", "Your Message Body"
0
 

Author Comment

by:SteveL13
ID: 38864748
Actually, I need to be able to do either one.  I know its hard to believe but sometimes, in this case, faxing is the only alternative.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 38864837
OK, I reached out to an Expert who may be able to help...
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:SteveL13
ID: 38864890
Thank you.
0
 

Author Comment

by:SteveL13
ID: 38864976
To boag

I'm going to post a new question regarding the email choice.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 38865028
DoCmd.SendObject acSendReport, "rptJob", acFormatPDF, "txtEmail", , , "Leigh Transport From " & [txtFromCity] & " - " & [txtToCity]",& "See attached.  Best Regards Leigh Transport"

You did not state what error you were getting, but my guess is the you don't need the quotes around: txtEmail
..and I am not sure about your concatenation
Try this:

DoCmd.SendObject acSendReport, "rptJob", acFormatPDF, txtEmail, , , "Leigh Transport From " & [txtFromCity] & " - " & [txtToCity], "See attached.  Best Regards Leigh Transport"

Or this perhaps...?:
DoCmd.SendObject acSendReport, "rptJob", acFormatPDF, txtEmail, , , "Leigh Transport From " & [txtFromCity] & " - " & [txtToCity] & ", See attached.  Best Regards Leigh Transport"
0
 

Author Comment

by:SteveL13
ID: 38865070
Sorry... I was trying to keep from asking two questions in one topic.  

Anyway,,  neither solution works.  I get an error:  "Can't find the field '|1' referred to in your expression"
0
 
LVL 74

Accepted Solution

by:
Jeffrey Coachman earned 2000 total points
ID: 38865164
Check closely the names of your fields

This woks fine for me buddy:
Database88.mdb
0
 

Author Comment

by:SteveL13
ID: 38865235
You are correct... it would work for me too if I had the right field names.  But now I had to add some copy at the end of the subject line and its broken again.  Hee is what I have now...

DoCmd.SendObject acSendReport, "rptConfirmJobDetails", acFormatPDF, txtEmailAddress, , , "Leigh Transport From " & [txtFromCity] & " - " & [txtToCity] & " - Collection Details - Our Ref - " & [txtJobNo] , See attached.  Best Regards Leigh Transport"

The copy that reads "See attached... and so forth is supposed to be in the body of the email message, not on the subject line.

And one more thing...

The body should read,

Best Regards
Leigh Transport (on a new line)

Help?
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 38865307
Then I am still confused about your syntax.,...?

In any event I don't believe you can do a word wrap with just plain text in the Message body.
(Remember, SendObject was created to be a "simple, no frills" way to send an email.

You would have to go through all the trouble of creating an email in code:
http://support.microsoft.com/kb/161088
... then use .HTMLBody to display a word wrap
    YourString="Line One <br> Line Two"

(Not worth the trouble IMHO, just for a word wrap)

...Besides, what you want there is really a "Closing" statement, ...not really a "Message"
So this may be more appropriate to be set in your custom signature in Outlook

;-)

JeffCoachman
0
 

Author Comment

by:SteveL13
ID: 38865327
Ok, forget the idea about having a new line after "Best Regards".

Can you still help me with this:

DoCmd.SendObject acSendReport, "rptConfirmJobDetails", acFormatPDF, txtEmailAddress, , , "Leigh Transport From " & [txtFromCity] & " - " & [txtToCity] & " - Collection Details - Our Ref - " & [txtJobNo] , See attached.  Best Regards Leigh Transport"
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 38865434
Help you with what, specifically?
I posted a working sample...

Or better yet post a sample database and post a clear example of the *exact* output you require...


Jeff
0
 

Author Comment

by:SteveL13
ID: 38865467
I'm sorry.  Yes, you did post a working sample.  But then I had to add copy at the end of it and I broke the syntax.  

Here is what you posted which did work fine...

DoCmd.SendObject acSendReport, "rptJob", acFormatPDF, txtEmail, , , "Leigh Transport From " & [txtFromCity] & " - " & [txtToCity] & ", See attached.  Best Regards Leigh Transport"

But then I changed it to (which broke it)...

DoCmd.SendObject acSendReport, "rptJob", acFormatPDF, txtEmailAddress, , , "Leigh Transport From " & txtFromCity & " - " & txtToCity & " - Collection Details - Our Ref - " & [txtJobNo], "See attached.  Best Regards, Leigh Transport"

If I could post a sample database I would.  Again, sorry.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 38865534
...

...you are still not telling me what is wrong...
0
 

Author Comment

by:SteveL13
ID: 38865619
I'm going to go ahead an accept your solution because I found my own mistake in a field name.

Thank you for your time.  

But I'm still going to post another question looking for help with faxing a report.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 38865795
OK...

;-)
0

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question