Solved

Getting MS Access Front End to launch hyperlinks

Posted on 2013-01-08
2
206 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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Familiarize people with the process of utilizing SQL Server stored procedures 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 Micr…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

744 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

12 Experts available now in Live!

Get 1:1 Help Now