Hello all,
I have a searchable database that is set up in a similar fashion as Allen Browne's example found here. In the "search results" I then have a button that allows the user to view each form in a single view, using the following code:
This grabs the exact record that the user wants, as returned by the search results and displays it in a new form, where they can edit the information. I am trying to figure out a way to have a button that emails the user the information found in that record (which includes a .pdf attachment).
I have everything working except getting the record information (the most important part) in the body of the email. Here is my code thus far:
It creates the email just fine, but I have no idea how to get the record info in the body. Any guidance would be greatly appreciated
I have a searchable database that is set up in a similar fashion as Allen Browne's example found here. In the "search results" I then have a button that allows the user to view each form in a single view, using the following code:
Code:
Private Sub Command151_Click()
DoCmd.OpenForm "ArticleEdit", , , "ArticleID = " & Me.ArticleID
End Sub
I have everything working except getting the record information (the most important part) in the body of the email. Here is my code thus far:
Code:
Private Sub Command173_Click()
Dim olapp As Outlook.Application
Dim olNewMail As Outlook.MailItem
Dim eTo, eSubject, ebody As String
eTo = ""
eSubject = "Article Please Read"
ebody = "Record Information" 'I need to place the record here
Set olapp = New Outlook.Application
Set olNewMail = olapp.CreateItem(olMailItem)
olNewMail.To = eTo
olNewMail.Subject = eSubject
olNewMail.Body = ebody
olNewMail.Display
End Sub
It creates the email just fine, but I have no idea how to get the record info in the body. Any guidance would be greatly appreciated
