To elaborate, I have Access database named "Test" . In a form , the supervisor enters all the details and click 'Send' button then a link to the other database
named "Agent_database" gets sent to the Agent.
Code:
Public Sub
SendEmail()
Set appOutLook =
CreateObject("Outlook.Application")
Set MailOutLook =
appOutLook.CreateItem(olMailItem)
Dim myLink As String
myLink =
"L:\AgentDB.Accdb"
With MailOutLook
.To =
DLookup("[Email]", "tblStaff", "[strUser]='" & NameofUser() & "'")
.Subject = FName & " needs to be signed off"
.HTMLBody = FName & " has been completed by " & DLookup("[Staff Name]",
"tblstaff", "struser='" & NameofUser() & "'") & "." & vbCrLf
& vbCrLf & "The Reference number is " & gRef & ". " &
vbNewLine & vbNewLine & "Please click on this link to review and
signoff: <a href='" & myLink & "'>Click me</a>."
.sEnd
End With
End Sub
When the Agent receives the email and click the link the Agent database gets opened up and the listbox displays all its pending activities to be completed.
But if I make accde of Agent database and amend the vba code so that link to accde file gets sent instead . So when the Agent receives link to accde and open it then the listbox on agent database displays nothing in it.
I hope I made it clear. Please let me know if anything is unclear.
thanks