Solved

Getting MS Access Front End to launch hyperlinks

Posted on 2013-01-08
2
207 Views
Last Modified: 2013-04-25
Hi,

We have converted an MS Access database to use a SQL Server backend database and need to get the retained in MS Access forms to work as they did before the split.  We need to be able to:

1. Launch a browser session when the website address is clicked in the website field
2. Launch a new email when the email address is clicked in the email field

I believe this needs to be done using VB code but I need to know what the code is.

Thanks
0
Comment
Question by:qjump
2 Comments
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 385 total points
ID: 38757302
I'd remove the "hyperlink" syntax, and instead store JUST the full URL to the link (like http://www.microsoft.com), and then just set the Hyperlink property of your form's Control - see if that works.

If not, then you can add code like this in the Click or DoubleClick event:

Application.FollowHyperlink Me.YourFieldName
0
 
LVL 12

Expert Comment

by:duttcom
ID: 38757322
You can send an email via Outlook with the code below. This code for a button, but you could easily run it when the field is clicked instead. You will obviously need to change the field name from Me.Contact_Email to whatever your email field is called.
Private Sub btn_Email_Click()
On Error GoTo Err_btn_Email_Click

    Dim stDocName As String

    stDocName = "Empty_Report"
   ' DoCmd.SendObject acReport, stDocName
    DoCmd.SendObject acSendNoObject, stDocName, acFormatXLS, Me.Contact_Email, , , "Subject", , True
Exit_btn_Email_Click:
    Exit Sub

Err_btn_Email_Click:
    MsgBox Err.Description
    Resume Exit_btn_Email_Click

End Sub

Open in new window

0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the years I have built up my own little library of code snippets that I refer to when programming or writing a script.  Many of these have come from the web or adaptations from snippets I find on the Web.  Periodically I add to them when I come…
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now