Hyperlinks in a table, each click opens NEW browser window - me no likeee

peskywinnets

Registered User.
Local time
Today, 11:22
Joined
Feb 4, 2014
Messages
578
So I have a table with hyperlinks (formed from the contents of other fields on the same row)....it all works, I click on the hyperlink & a browser window opens *but* a new browser window is opened each time - ok, you might think so what? Well the problem is, I'm actually trying to browse to a paypal transaction (how I anticipated this would work is, that I login to paypal once then when I click on the hyperlink it takes me to the actual transaction from my hyperlink, but becuase a new window browser opens each time I click on a hyperlink, I'm prompted to login to paypal, after I do, the link I initially wanted to go to is lost by paypal ........therefore I can't click on a hyperlink to go direct to the paypal transaction). If access only opened one browser window, then all this would work...any ideas how to force this?
 
From access help here:-
https://msdn.microsoft.com/en-us/library/office/ff822080.aspx

You will see how the hyperlink function works and the options you have when using it:-

expression .FollowHyperlink(Address, SubAddress, NewWindow, AddHistory, ExtraInfo, Method, HeaderInfo)

You need to change the "new window" option from its default where it is optional and nothing is in it; you need to add a 0 so that it does not open a new window.....

NewWindow is "Optional"
Boolean
A Boolean value where True (–1) opens the document in a new window and False (0) opens the document in the current window. The default is False.

However if you read that it says it's already false and shouldn't open a new window! I've tried it both "true" and "false" and it always opens a new window! I'm wondering if you can look at the other options available in the hyperlink like "ExtraInfo"
 
Change the New Window setting in the default browser.

In IE this is Internet Options > General > Tabs > Open links from other programs in:
 
I tried both Google Chrome and Internet Explorer
 
From access help here:-
https://msdn.microsoft.com/en-us/library/office/ff822080.aspx

You will see how the hyperlink function works and the options you have when using it:-

expression .FollowHyperlink(Address, SubAddress, NewWindow, AddHistory, ExtraInfo, Method, HeaderInfo)

You need to change the "new window" option from its default where it is optional and nothing is in it; you need to add a 0 so that it does not open a new window.....

I'm a little puzzled at the above, these are hyperlinks that already exist in an access table ...whereas that reference above looks to be code for creating them (mine are already created).

I use chrome...the feature for opening in same window doesn't appear tobe there?
 
I'm a little puzzled at the above, these are hyperlinks that already exist in an access table ...whereas that reference above looks to be code for creating them (mine are already created).

I use chrome...the feature for opening in same window doesn't appear tobe there?

That's because you can call the hyper link from a command button with code something similar to this:-

Code:
Option Compare Database
Option Explicit

Private Sub Command0_Click()

Dim Hyper As String
    
    If InStr([TEAMFacebook], "https") Then
        Hyper = Me.TEAMFacebook
        MsgBox " >>> With HTTP " & Hyper
    Else
        Hyper = ("https://www.facebook.com/" & Me.TEAMFacebook)
        MsgBox " >>> NO HTTP " & Hyper
    End If
    
    Application.FollowHyperlink Hyper

End Sub


This Code opens a Facebook page using the Facebook users name. Example from a post I answered here a while back...

This code checks to see if there's a complete URL; if not, it adds the Facebook part of the URL to the username.
 
It is my understanding that modern browsers do not honor parameters to open in new windows. Instead, they use their own internal settings. So basically check the settings in your browser.
 
That's because you can call the hyper link from a command button with code something similar to this:-

This code checks to see if there's a complete URL; if not, it adds the Facebook part of the URL to the username.

But I'm, using a table (it's just me using the database & for simplicity, I prefer using the database direct rather than front ending it with a form or report)......not sure I can have a button in a table?
 
The point is if it's not working how you want it to then you might have to try something else!

However it's a moot point because it appears that the functionality you require is no longer supported. You still have one lead to follow up as mentioned by:- Galaxiom

Which browsers honour the NewWindow argument in FollowHyperlink?

Another variation would be to use ShellExecute and specify the browser.

Have a look into that suggestion, see if it can be made to work. If it does work, then you have a decision to make. Do you want to carry on with your tables, or do you want to call the hyperlink with a command button? An out side possibly:- Is there a way to change how the hyperlink is called from a table? I don't hold out much hope for that one though! However, I am regularly surprised by the capabilities that MS Access has, capabilities that I've never seen before....
 

Users who are viewing this thread

Back
Top Bottom