OK, here is an example that I found on a public forum. The code is credited to Jim Everist. I do not know HTML, so I leave it to you to modify the HTML to the specifics of your application. As to opening your database to a specific record, you can use the OpenForm of the DoCmd with a where clause argument....
For example (assuming where clause returns a text value), DoCmd.OpenForm "YourForm",,, "[SomeField] = '" & YourVariable & "'"
-
'Set the mail .BodyFormat to HTML (= olFormatHTML) and then use HTML tags inside of the .HTMLBody property like this:
-
-
Sub SendFileLink()
-
Dim sSubject As String, sBody As String, sEmail As String
-
-
sSubject = "Test File Hyperlink Email"
-
sBody = sBody & "This is the filename link:" & vbCrLf
-
sBody = sBody & "<A href=""file://server-name/share/folder/folder/folder/file""><FONT face=Verdana size=2>filename</FONT></A>"
-
sEmail = "emailname@company.com"
-
-
Dim oApp As New Outlook.Application
-
Set oApp = New Outlook.Application
-
-
Dim oMail As Object
-
Set oMail = oApp.CreateItem(olMailItem)
-
-
oMail.BodyFormat = olFormatHTML
-
oMail.HTMLBody = sBody
-
oMail.Subject = sSubject
-
oMail.To = sEmail
-
-
oMail.Send
-
-
Set oMail = Nothing
-
Set oApp = Nothing
-
-
End Sub