[AccessD] Hyperlink Problem

Ryan W wrwehler at gmail.com
Thu Dec 28 10:41:03 CST 2023


Rocky, perhaps try this

Public Function OpenURL(theURL As String, Optional focus As Integer =
vbNormalFocus)
    ShellExecute Screen.ActiveForm.hWnd, "open", theURL, "", "", focus
End Function

Public Declare Function ShellExecute Lib "shell32.dll" Alias
"ShellExecuteA" (ByVal hwnd As Long, _
    ByVal lpOperation As String, _
    ByVal lpFile As String, _
    ByVal lpParameters As String, _
    ByVal lpDirectory As String, _
    ByVal nShowCmd As Long) As Long


then call OpenURL "that.troublesome.url"



On Thu, Dec 28, 2023 at 10:27 AM Rocky Smolin <rockysmolin2 at gmail.com>
wrote:

> Yes, checked that. So cigar. Works here and there with a direct paste to
> the browser, and fails in both place from the code.
>
> However, it works for you from the code so do you have any speculation
> about differences between my program and yours. I'm still using Access 2010
> for this user.  Could that be an issue?
>
> Thanks
>
> Rocky
>
>
>
> r
>
> On Wed, Dec 27, 2023 at 7:06 PM Stuart McLachlan <stuart at lexacorp.com.pg>
> wrote:
>
> > I note that you have no debug code showing the actual value in
> > Me.fldMaintenanceStepNotionLink
> > Have you checked that it is returning the correct link?
> >
> >
> >
> > On 27 Dec 2023 at 16:51, Rocky Smolin wrote:
> >
> > > Dear List:
> > >
> > > My client is using an online product called Notion and has links to
> > > his Notion Folders on his Notion site which he wants to embed in the
> > > app I wrote for him.
> > >
> > > When I copy one of the links and paste it into the browser it works.
> > > It did not work initially but he gave me permissions to the folders
> > > and so then it worked.
> > >
> > > Sample link looks like this:
> > >
> > > https://www.notion.so/1-Make-Folder-ec50ff0941a243f0ba97aac5ffc37e26
> > >
> > > When I click the Test Link button I get err.number = 6 - Invalid Link
> > >
> > > He gets the same thing at his desk-works in the browser but not from
> > > the CBF.
> > >
> > > Here's the code:
> > >
> > > Private Sub cmdTestLink_Click()
> > >
> > > On Error GoTo LinkError:
> > >
> > >     Application.FollowHyperlink
> > >     Address:=Me.fldMaintenanceStepNotionLink Exit Sub
> > >
> > > LinkError:
> > >     If Err.Number = 490 Or Err.Number = 6 Then
> > >         MsgBox "Invalid Link", vbExclamation
> > >         Exit Sub
> > >     Else
> > >         MsgBox "Run Time Error: " & Err.Number & "-" & Err.Description
> > >         &
> > > "." & vbCrLf & vbCrLf _
> > >             & "Report to Beach Access Software.", vbExclamation
> > >     End If
> > >
> > > End Sub
> > >
> > > If I test an address like Google or Wiki or Hooters, it works as long
> > > as I have the HTTP prefix.
> > >
> > > Any ideas why this is failing? Something to do with permissions.
> > > maybe?
> > >
> > > MTIA
> > >
> > > Rocky
> > > --
> > > AccessD mailing list
> > > AccessD at databaseadvisors.com
> > > https://databaseadvisors.com/mailman/listinfo/accessd
> > > Website: http://www.databaseadvisors.com
> > >
> >
> >
> > --
> > AccessD mailing list
> > AccessD at databaseadvisors.com
> > https://databaseadvisors.com/mailman/listinfo/accessd
> > Website: http://www.databaseadvisors.com
> >
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> https://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>


More information about the AccessD mailing list