Hi All
We have a process whereby a manager needs to authorise all sample orders. I have a form where users enter all the order information and then on the form,I have created a button that creates a pdf file and emails this to specified users. Currently I have inserted a hyperlink in the email body (which points to Bing).
However what I would like is the hyperlink to open an access form for a particular record (the id that needs approval) so that the manager can approve. Is this possible? I am not a code expert so please go easy on me ha!
Please see current code below:
Code:
Private Sub Command791_Click()
Dim appOutLook As Object
Dim MailOutLook As Object
Set appOutLook = CreateObject("Outlook.Application")
Set MailOutLook = appOutLook.CreateItem(olMailItem)
Dim strWhere As String
strWhere = Me.ID
DoCmd.Close acForm, "Enter New Sample Order"
DoCmd.OpenReport "Sample Order Form", acViewReport, , "ID = " & strWhere
DoCmd.OutputTo acOutputReport, "Sample Order Form", _
acFormatPDF, "Location\Sample Form For ID " & strWhere & ".pdf"
With MailOutLook
' .BodyFormat = olFormatRichText
.To = "receipient1; recipient2"
.Attachments.Add "Location\Sample Form For ID " & strWhere & ".pdf"
.Subject = "Test"
.HTMLBody = "Test HL: <a href='https://www.bing.com/?pc=EUPP_'>Link description here</a>"
.Send
End With
DoCmd.Close acForm, "Enter New Sample Order"
DoCmd.Close acReport, "Sample Order Form"
DoCmd.OpenForm "Main Menu"
End Sub