Advertisement

09.06.2008 at 11:11AM PDT, ID: 23709010
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.7

How to email data from a subform using VBA.

Asked by AbacusInfoTech in Access Coding/Macros, Microsoft Access Database, Access Forms

Tags: , ,

Hi,

I have created a button that will allow me to email data from a record in a form, but what I have no idea how to do is email the related record in that forms subform. My code is attached and I want my subform data to appear in place of the line: strBody2 = "DETAILS HERE" & cRR

For example, my email might contain data about a quotation from the main form (like date, quote number), and then from the subform it would contain one or several lines from that quotation.



Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
Option Compare Database
 
Private Sub btnEmailQuote_Click()
 
Dim strSubject As String
Dim strBody0 As String
Dim strBody1 As String
Dim strBody2 As String
Dim strBody3 As String
Dim quoteterms1 As String
Dim quoteterms2 As String
Dim strIn As String
 
Const cR = vbCrLf
Const cRR = vbCrLf & vbCrLf
 
strSubject = "Quote # " & Me.quoteid & ": " & Me.quotedescription
strBody1 = "Thank you for your recent enquiry relating to the purchase of " & Me.quotedescription & ", I hope the following is of interest:" & cRR
strBody2 = "DETAILS HERE" & cRR
strBody3 = "Price Ex VAT: " & Format(Me.txtItemTotalExVAT, "Currency") & cRR & "Delivery Ex VAT: " & Format(Me.quotedelivery, "Currency") & cRR & "Total Ex VAT: " & Format(Me.txtTotalExVAT, "Currency") & cRR & "VAT Amount: " & Format(Me.txtVAT, "Currency") & cRR & "Grand Total: " & Format(Me.txtTotal, "Currency") & cRR
quoteterms1 = "Quote Notes:" & cR & "===========" & cR & Me.quotenotes & cRR
quoteterms2 = "Quote Terms:" & cR & "===========" & cR & Me.quoteterms & cRR
 
strBody0 = strBody1 & strBody2 & strBody3 & quoteterms1 & quoteterms2
 
DoCmd.SendObject acSendNoObject, cc:="me@here.com", subject:=strSubject, messagetext:=strBody0, EditMessage:=True
 
End Sub
 
 
[+][-]09.06.2008 at 11:17AM PDT, ID: 22408442

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Access Coding/Macros, Microsoft Access Database, Access Forms
Tags: Microsoft, Access, 2003
Sign Up Now!
Solution Provided By: capricorn1
Participating Experts: 2
Solution Grade: B
 
 
[+][-]09.06.2008 at 11:58AM PDT, ID: 22408576

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.06.2008 at 03:15PM PDT, ID: 22409270

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.07.2008 at 05:07AM PDT, ID: 22411049

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]09.08.2008 at 02:01PM PDT, ID: 22421584

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.10.2008 at 02:35PM PDT, ID: 22443380

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.15.2008 at 04:04AM PDT, ID: 22477322

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628