Following a plain text Hyperlink from Access 2000
Posted on 2001-08-16
I have a form with two controls
and a bound textbox
When I click on btnFollowHyperlink I want to launch Internet Explorer and make it go to the website stored as plaintext in CompanyWebsite.
And no I do not want to use the native access hyperlink datatype :-)
The code I have is as follows. It seems that this used to work on Windows98 and Access2000, but now doesnt work under Windows2000 Pro. Any ideas?
Private Sub btnFollowHyperlink_Click()
On Error GoTo bfhErr:
Dim stDocName As String
stDocName = Forms!Contacts!CompanyWebsite
Dim ctl As CommandButton
Set ctl = Me!btnFollowHyperlink
Application.FollowHyperlink stDocName, , True
Select Case Err.Number
MsgBox "There is no internet connection", vbInformation, "Please connect to the internet and try again."
MsgBox "The page could not be found online. Please check the address.", vbInformation, "Page not found."
MsgBox "Problem Number " & CStr(Err.Number) & " - " & Err.Description