473,320 Members | 1,840 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Email Item as Link from Access

TheSmileyCoder
2,322 Expert Mod 2GB
Assumptions:
I know how to create email from within Access, using outlook automation.
User has the access frontend installed
Office 2003

Is it possible to create a hyperlink in a email that will accomplish the following, when receiver clicks it:?

Open the access front-end on the users PC.
Open relevant form
Goto relevant Item


If its not possible in the way I have described it, I have several modifications that could be acceptable, for example, it would be ok to require that the user has the frontend open when clicking the link. It would also be ok if I had to install a add-on to the users outlook.
Jan 19 '12
54 14165
TheSmileyCoder
2,322 Expert Mod 2GB
@Mariostg: I allready have a installer (basicly another mdb file) that users open to install the main application. This also creates a shortcut on their desktop. (Thats the link part). The application allready has a form called "My Reviews", which shows the reviews assigned to each user, sorted by review status, with buttons to open each review (open form and goto specific item part).
Your suggestion (While appreciated, don't misunderstand me!) adds nothing new really. In short you could say the functionality missing is 1 Email=1 itemLink.

The hyperlink in the email is really just a nice to have feature.

@Adezii1) No not directly. By that I mean that I cannot sit from my own PC and remotely interact with theirs. I can go shove them off their chair and do work at their workstation. I am not IT savvy, my main expertise lies in Access and Railway Safety (odd combo).
That said, each user has their own frontend which gets updated automatically when the user starts an "old" frontend. So if I can add the code to the frontend, You might say that through MSAccess I get access to their PC, and If I can code it in access it can run on their PC with "their" rights.

2)Same as 1)
Jan 26 '12 #51
NeoPa
32,556 Expert Mod 16PB
Smiley:
I just want to tack this onto the thread before I forget it. You can get the MSAccess.exe path from the excel file if you have set a reference to the Access object model, and then use:
Expand|Select|Wrap|Line Numbers
  1. SysCmd(acSysCmdAccessDir)
Excellent. I didn't know about this and I've done various projects (and other questions on here) where this would have proven very useful. I was assuming for a while (before my brain kicked in) that this would be handled by the code at Smiley's end that prepared the command line itself (in cell A1), but then I realised that Smiley's setup may be different from any of his users so it would, indeed, need to be incorporated into the Excel code after all. It's a very worthwhile piece of code though and I was happy to add it to the workbook already provided :-)

NB. In the code below a deliberate choice was made to use late-binding (IE. No Library Reference was made to any version of Access). This is to reduce any likelihood of problems handling potentially various versions on the target PC. It explains the need for the definition of conAccessPath, which is a duplication of acSysCmdAccessDir which would otherwise have been available.
Expand|Select|Wrap|Line Numbers
  1. Option Explicit
  2.  
  3. Private Const conAccessPath As Long = 9
  4.  
  5. Private Sub Workbook_Open()
  6.     Dim strMsg As String, strCmd As String, strAccessPath As String
  7.  
  8.     With CreateObject(Class:="Access.Application")
  9.         strAccessPath = .SysCmd(conAccessPath)
  10.         Call .Quit
  11.     End With
  12.     strCmd = Range("A1")
  13.     strCmd = Replace(strCmd, "%AccessPath%", strAccessPath)
  14.     strCmd = Replace(strCmd, "%ProgramFiles%", Environ("ProgramFiles"))
  15.     strMsg = "You are about to run the command :%L%L%C"
  16.     strMsg = Replace(strMsg, "%L", vbNewLine)
  17.     strMsg = Replace(strMsg, "%C", strCmd)
  18.     If MsgBox(Prompt:=strMsg, _
  19.               Buttons:=vbOKCancel Or vbQuestion, _
  20.               Title:="RunCommand") = vbOK Then _
  21.         Call Shell(PathName:=strCmd, WindowStyle:=vbMaximizedFocus)
  22.     If Application.Workbooks.Count > 1 Then
  23.         Call Me.Close
  24.     Else
  25.         Call Application.Quit
  26.     End If
  27. End Sub
Smiley:
Users must also allow macros, in order for the excel code to run. I think a potential problem with the Excel solution is that we will soon be upgrading to Office 2010, and I fear that I will have to look into a lot of macro security issues at that time.
Indeed. You will find this precondition referred to in post #44.

My own preferred solution to users running my code, without compromising their macro security generally, is to sign all my projects. Information on how this may be done for free can be found at Code Signing.
Attached Files
File Type: zip RunCmd.Zip (19.7 KB, 98 views)
Jan 26 '12 #52
Mariostg
332 100+
@TheSmileyCoder
Expand|Select|Wrap|Line Numbers
  1. Your suggestion (While appreciated, don't misunderstand me!) adds nothing new really
Don't worry. I did not loose any sleep on this. You are spoiling your users. I hope they see and recognize the efforts you are investing :).
Jan 30 '12 #53
NeoPa
32,556 Expert Mod 16PB
Lol Mario :-D

It never hurts to let the users think it's for their benefit, but we all understand it's mainly to stop all the calls back to you when they manage to muck (was that an 'm'?) up even the simplest procedures and break even the most robust systems. The less scope they have for damage the better I sleep :-D

PS. I see one of the big benefits of contributing to a forum site such as this is that we can all pick up from, and use for ourselves, some of the ideas and procedures that get developed to handle questions such as these. I certainly intend to add this one to my arsenal, and I'd never considered this type of problem before.
Jan 30 '12 #54
TheSmileyCoder
2,322 Expert Mod 2GB
I finally figured this out, many years later, and blogged about. You can find the blog post here:
http://thesmileycoder.com/access-ema...ink-to-record/
Jan 30 '17 #55

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: James Fraley | last post by:
I've created a MS Access form and get the exact same results as below? Now, I believe it has something to do with storing EMails, not OLE. I will appreciate any help! ...
5
by: Alan | last post by:
Hello, I trying to export my email to an access database. Outlook already this function, but not all the fields are available once the export is complet. The time & date stamps are not...
0
by: gj | last post by:
If anyone has worked with this I would be interested to find out. I have successfully put send/receive emails into an application using SMTP/POP server but would like to do something more...
7
by: Daven Thrice | last post by:
I know how to send email out of Access, and that's no problem. What I need to figure out is how to receive email into access. Say that I give access an email address, such as access@daven.com. I...
8
by: tymperance | last post by:
I have a report that I currently email directly from Access as an attachment using a macro. I need to make it be the body of the email instead. Can that be accomplished without extensive VBA...
2
by: diwadube2003 | last post by:
I get a Warning message while automatically sending email through MS Access, using Outlook. Can anybody help me out with this.
6
by: ttamilvanan81 | last post by:
Hai. I needto Receive Email using Ms-Access and Outlook. On the receiving end, the user receives the email at the Outlook. When they opens the Email, the message box should have a button called...
2
by: PPPPPPPPP | last post by:
I Am Not Able To Link Access Database In Visual Basic .please Help Me To Do So . Thanking You In Anticipation.
0
by: wassimdaccache | last post by:
Hello Experts; I have a wireless router TP-link I made security phrase for it. What i am trying to do is to configure a d-link access point as a repeater for the TP-link and always not...
4
by: davekearley | last post by:
Hi all, first post, looks like a great site. I have a small problem with Access. I need to link to an ODBC table (SQL7) but when i go to the link dialogue, the ODBC entry is missing. I have...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.