Linking directly to an access form from an email (1 Viewer)

stardust1979

New member
Local time
Today, 04:07
Joined
Aug 4, 2014
Messages
3
Hi,

I have a form which on selecting a command button sends out an email to a manager to say a specification is ready to be reviewed (this contains a link to a sharepoint site where the spec resides). The "approval" details are stored in by DB also so I would like to have included in that email a link back to the access db and the particular record so the person receiving the email can easily approve, if that makes sense.

Is that possible? Does anyone know how?

Here is my code for generating the email (at the point "To approve please click here" is where I would like my link to go):

Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)


strbody = "<font size=""3"" face=""Calibri"">" & _
"Dear xxxx,<br><br>" & _
"There is a new Development Specification ready for your approval :<br><B>" & _
txtWorkRequestID & " - " & txtDescription & "</B> <br>" & _
"Click on this link to open the file : " & _
"<a href='" & txtSpecLink & "'>" & _
""">Link to the file</A>" & _
"To approve please click here : " & _
"<br><br>Kind Regards," & _
"<br><br>xxxx</font>"

vRecipientList = DLookup("Email", "tblStaff", "[MALTTeam]= 'MAN'")
vSubject = "New xxxx Development Specification ready for your approval"

On Error Resume Next
With OutMail
.to = vRecipientList
.CC = ""
.BCC = ""
.Subject = vSubject
.HTMLBody = strbody
.Display 'or use .Send
End With

Thanks in advance
 

Minty

AWF VIP
Local time
Today, 12:07
Joined
Jul 26, 2013
Messages
10,368
What version of Access are you using?

In 2007 you can run a macro or cmd as part of a command line switch which possibly could get you half way to your needs?
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 12:07
Joined
Jul 9, 2003
Messages
16,271
I don't think so....

However, if I was to attempt it I think I'd research opening a UNC with command line switches. I have this vague recollection you can call macros like this. I think you can pass a parameter like a record number, but I don't really know.

http://www.robvanderwoude.com/commandlineswitches.php#MSAcces

This on stackoverflow is more like what you want:-
http://stackoverflow.com/questions/7117792/ms-access-open-database-form-from-url
 

spikepl

Eledittingent Beliped
Local time
Today, 13:07
Joined
Nov 3, 2010
Messages
6,142
Erh - if you have a sharepoint site can one not click on a link there? http:\\mysite\?param=myuseridvaluelabla ?
 

Users who are viewing this thread

Top Bottom