473,324 Members | 2,178 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,324 software developers and data experts.

Linking to an access record from an email

Hello,

I've developed an access database to track work against team plans and organizational objectives.

I'm trying to implement a feature but I'm not sure where to start. I'm wondering if there is any way of opening a database at a specific record by using a hyperlink in an email.

For example, I want users to be able to receive an email like

"I've assigned this task to you. Please check it out on the database (hyperlink)"

Is there any way of passing arguments to Access in this way?
Any suggestions appreciated.
Dec 18 '08 #1
3 1627
puppydogbuddy
1,923 Expert 1GB
see this link for code that might help you get started, and give you something that you can adapt and build on.

Access Reading Outlook E-Mails from Access
Dec 18 '08 #2
Hi,

Thanks for the reply, Puppydogbuddy.
I'm a little confused as to how to start with this one; am I right that this bit of code actually monitors the inbox?

The database wouldn't always be open, so I wonder if there would be any way of passing arguments from a hyperlink in an email to start the database and then go to a specified record?

I'd rather not tamper with my colleagues' inboxes if possible!
Dec 19 '08 #3
puppydogbuddy
1,923 Expert 1GB
OK, here is an example that I found on a public forum. The code is credited to Jim Everist. I do not know HTML, so I leave it to you to modify the HTML to the specifics of your application. As to opening your database to a specific record, you can use the OpenForm of the DoCmd with a where clause argument....
For example (assuming where clause returns a text value), DoCmd.OpenForm "YourForm",,, "[SomeField] = '" & YourVariable & "'"


Expand|Select|Wrap|Line Numbers
  1. 'Set the mail .BodyFormat to HTML (= olFormatHTML) and then use HTML tags inside of the .HTMLBody property like this:
  2.  
  3. Sub SendFileLink()
  4. Dim sSubject As String, sBody As String, sEmail As String
  5.  
  6. sSubject = "Test File Hyperlink Email"
  7. sBody = sBody & "This is the filename link:" & vbCrLf
  8. sBody = sBody & "<A href=""file://server-name/share/folder/folder/folder/file""><FONT face=Verdana size=2>filename</FONT></A>"
  9. sEmail = "emailname@company.com"
  10.  
  11. Dim oApp As New Outlook.Application
  12. Set oApp = New Outlook.Application
  13.  
  14. Dim oMail As Object
  15. Set oMail = oApp.CreateItem(olMailItem)
  16.  
  17. oMail.BodyFormat = olFormatHTML
  18. oMail.HTMLBody = sBody
  19. oMail.Subject = sSubject
  20. oMail.To = sEmail
  21.  
  22. oMail.Send
  23.  
  24. Set oMail = Nothing
  25. Set oApp = Nothing
  26.  
  27. End Sub
Dec 22 '08 #4

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

Similar topics

0
by: Jeff D. Hamann | last post by:
Sorry for the seemingly novice posting, but I could find a solution for this on the web so far... I've been developing a database using postgresql (and loving it) and have started running into...
3
by: John South | last post by:
I have an Access 2000 front end that I wish to work with a SQL Server 2000 database by means of Linked tables. Do I have to use an ODBC connection to SQL Server? It seems to be the only option...
14
by: diskoduro | last post by:
Hi!! Years ago I built a database to control the production of a little factory. The users wanted to work in a Windows Net workgroup so I created an mdb with all the tables and data an after...
4
by: Mark T. | last post by:
Hi, I've got a simple DB (Office Win XP Professional). Basically, it's like a check book register - deposit, deduction and running sum. I'd like to somehow link it to an Excel spreadsheet that...
4
by: Mason | last post by:
This is probably an incredibly newbie-ish question. I just haven't had the cause to use many subforms before, so I'm pretty sure I just don't understand it correctly (even after reading up on it)....
2
by: TheTamdino | last post by:
One of the things that is common between most genealogy databases is that they will have one screen were you log all the information for a given person and then (maybe) have a link to a source...
5
by: chrisse_2 | last post by:
Hi, All the records in my database will contain at least one picture. At the moment all the images are part of the database as ole objects although the database is way to big and there is only...
0
by: Jeff D. Hamann | last post by:
Sorry for the seemingly novice posting, but I could find a solution for this on the web so far... I've been developing a database using postgresql (and loving it) and have started running into...
4
by: Mike | last post by:
I have a multiuser access database to which I have split into fe & be. The system refreshes the links at each log-on between the fe & be automatically via code. PROBLEM: Locally it runs...
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
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...
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...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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)...
1
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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.