T
Tony Williams
I have a form on which there is a tick box which opens Outlook with data
from the form and prompts the user to amend the message before being sent.
The code is
Private Sub Loadtxt_Click()
Dim oA As Outlook.Application
Dim oM As Outlook.MailItem
Set oA = CreateObject("Outlook.Application")
Set oM = oA.CreateItem(olMailItem)
If Me!Loadtxt = True Then
oM.Subject = "Upload to Online " & Me.Docnumtxt
oM.Body = "Please upload this document to Online " & vbCrLf & "Document
Number: " & Me.Docnumtxt & vbCrLf & "Author: " & " " & Me.DocAuthortxt &
vbCrLf & "Document URL: " & " " & Me.DocURLtxt
'then you can send it
'oM.Send
' or display it for editing
oM.Display
End If
End Sub
On my form is a tab control on which there is a subform called
tblDocSubjectssubform which has a control called DocPSubjecttxt. I want to
include in the email the value of this control and have used this code &
me.tblDocSubjectssubform(DocPSubjecttxt) but it doesn't work. How can I
reference the control on the subform?
TIA
Tony Williams
from the form and prompts the user to amend the message before being sent.
The code is
Private Sub Loadtxt_Click()
Dim oA As Outlook.Application
Dim oM As Outlook.MailItem
Set oA = CreateObject("Outlook.Application")
Set oM = oA.CreateItem(olMailItem)
If Me!Loadtxt = True Then
oM.Subject = "Upload to Online " & Me.Docnumtxt
oM.Body = "Please upload this document to Online " & vbCrLf & "Document
Number: " & Me.Docnumtxt & vbCrLf & "Author: " & " " & Me.DocAuthortxt &
vbCrLf & "Document URL: " & " " & Me.DocURLtxt
'then you can send it
'oM.Send
' or display it for editing
oM.Display
End If
End Sub
On my form is a tab control on which there is a subform called
tblDocSubjectssubform which has a control called DocPSubjecttxt. I want to
include in the email the value of this control and have used this code &
me.tblDocSubjectssubform(DocPSubjecttxt) but it doesn't work. How can I
reference the control on the subform?
TIA
Tony Williams