Solved Open full URL within access

paulthepilot

New member
Local time
Today, 12:27
Joined
Sep 19, 2008
Messages
3
I have the following code that will not work

Dim StrUrl As String
StrUrl = http://www.racingpost.co.uk/horses/trainer_form.sd?trainer_id=17740
Call Shell("explorer.exe " & StrUrl, vbMaximisedFocus)

The following does work
Dim StrUrl As String
StrUrl = http://www.racingpost.co.uk/
Call Shell("explorer.exe " & StrUrl, vbMaximisedFocus)

Why, when I add the rest of the url does it not work
The url is valid and works as a hyperlink
I don't want to use a hyperlink because I will eventually change the id to a query generated number

Help !:o
 
Last edited by a moderator:
your urls are not in quotes.

if you want internet explorer try calling iexplore with the path:

Code:
Dim dblRetVal As Double
dim strUrl as string
    
strUrl = "..."
dblRetVal = Shell("C:\Program Files\Internet Explorer\iexplore.exe " & strUrl, vbMaximizedFocus)
Debug.Print dblRetVal
 
Thanks
I knew I was doing something stupid, I just couldn't grasp what it was
 

Users who are viewing this thread

Back
Top Bottom