Hi, i have some code I'm using to send an email to a user indicating that a database needs their input . What I've been trying to do as an extra is have a link on the sent email that when clicked opens the form that needs viewed. I have used the code below to open the database form with the correct data on the database
what i cant seem to figure out what i need to add to the following code below that would allow me to send a link to open the database on a location on the server...or even for example on the c drive path...c:\dev\devdatabase\formname.with condition
Any help in getting this started would be much appreciated, hope everyone is keeping well
ian
Code:
Private Sub Command3_Click()
Const cstrForm As String = "frmDevReq" ' <-- change this
DoCmd.OpenForm cstrForm, WhereCondition:="[DeviationRequestNumber]=" & 3
End Sub
what i cant seem to figure out what i need to add to the following code below that would allow me to send a link to open the database on a location on the server...or even for example on the c drive path...c:\dev\devdatabase\formname.with condition
Code:
Dim appOutLook As Object
Dim MailOutLook As Object
strDevNo = Forms!frmdevreq!Text112
strDevDesc = Forms!frmdevreq![Deviation Description]
strDevOwn = Forms!frmdevreq!Text116
strDevapp1 = Forms!frmdevreq!Text114
strDevapp2 = Forms!frmdevreq!Text120
strDevapp3 = Forms!frmdevreq!Text124
strDevapp4 = Forms!frmdevreq!Text128
strDevapp5 = Forms!frmdevreq!Text132
Set appOutLook = CreateObject("Outlook.Application")
Set MailOutLook = appOutLook.CreateItem(0)
With MailOutLook
.To = strDevapp1 & ";" & strDevapp2 & ";" & strDevapp3 & ";" & strDevapp4 & ";" & strDevapp1
.Subject = "Deviation raised " & strDevNo
.Body = "Hello " & _
vbCrLf & _
"A Deviation has been raised for your attention, number : " & strDevNo & _
vbCrLf & _
"Deviation was raised by " & strDevOwn & _
vbCrLf & _
" Deviation description:: " & strDevDesc
.Send
End With
Set appOutLook = Nothing
Set MailOutLook = Nothing
notified = True
Any help in getting this started would be much appreciated, hope everyone is keeping well
ian