Mark Wood
asked on
Hyperlink in Access
I need to create a hyperlink in access that goes to the imdb databae and i need it to pull whatever is in my title field.
the link will be formed as follows: http://www.imdb.com/find?s=all&q=and then pull the text from my title field and place it here.
can anyone help with this?
the link will be formed as follows: http://www.imdb.com/find?s=all&q=and then pull the text from my title field and place it here.
can anyone help with this?
You can add a WebBrowser to your form, and then call the Navigate function, and pass it your URL. This would open the URL in the embedded webbrowser control.
<then pull the text from my title field and place it here.>
?
?
ASKER
Yes. I have a field in my movie database named Title. On me form in the database I need to pull the text in the title field and add it to the end of the link.
So for example if the text in the "titke" field was avatar then the link would be http://www.imdb.com/find?s=all&q=avatar.
So for example if the text in the "titke" field was avatar then the link would be http://www.imdb.com/find?s=all&q=avatar.
build the string like this:
Dim sURL as String
sURL = "http://www.imdb.com/find?s=all&q=" & Me.YourTextField
Dim sURL as String
sURL = "http://www.imdb.com/find?s=all&q=" & Me.YourTextField
mwood6275, LSMConsulting,
OK, I understand now...
I thought you wanted the titles returned by the site to populate your table.
It is interesting to note that your specific search finds "Exact" matches.
So a seach of the word "Home" will result in primarilly listing movies that have the entire word "Home" as the title.
(will not include "Home Alone" or "Sweet Home Alabama")
However adding in the Wildcards (*Home*) will include even movies with "alternate" names containing "Home"
(ex:
Look Who's Talking (1989)
aka "Daddy's Home"
Rabbit-Proof Fence (2002)
aka "Long Walk Home" - Europe (English title)
Sample based on what LSM posted is attached.
Includes FollowHyperlink, Showhand and wildcard selection stuff....
No points wanted
Have fun
;-)
Off to see Mom now.
Jeff
Access-EEQ27024472WebsiteSearchH.mdb
ASKER
This is what I am trying to do with a button using your code.
Private Sub txtMovieTitle(Cancel As Integer)
Me.txtMyMovieTitle = "http://www.imdb.com"
End Sub
Private Sub Command27_Click()
Call Me.Title
Application.FollowHyperlin k Me.txtMyMovieTitle
End Sub
Private Sub txtMovieTitle_MouseMove(Bu tton As Integer, Shift As Integer, X As Single, Y As Single)
Call ShowHand
End Sub
Private Sub Me.txtMyMovieTitle()
If Me.txtTitle = 1 Then
Me.txtMovieTitle = "http://www.imdb.com/find?s=all&q=" & [txtTitle]
ElseIf Me.Title = 2 Then
Me.txtMovieTitle = "http://www.imdb.com/find?s=all&q=" & "*" & [txtTitle] & "*"
End If
End Sub
Havent made it work yet
Private Sub txtMovieTitle(Cancel As Integer)
Me.txtMyMovieTitle = "http://www.imdb.com"
End Sub
Private Sub Command27_Click()
Call Me.Title
Application.FollowHyperlin
End Sub
Private Sub txtMovieTitle_MouseMove(Bu
Call ShowHand
End Sub
Private Sub Me.txtMyMovieTitle()
If Me.txtTitle = 1 Then
Me.txtMovieTitle = "http://www.imdb.com/find?s=all&q=" & [txtTitle]
ElseIf Me.Title = 2 Then
Me.txtMovieTitle = "http://www.imdb.com/find?s=all&q=" & "*" & [txtTitle] & "*"
End If
End Sub
Havent made it work yet
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
throws a compile error on Private Sub Command27_Click()
ASKER
Private Sub Command27_Click()
Dim sURL As String
sURL = "http://www.imdb.com/find?s=all&q=" & Me.Title
FollowHyperlink sURL
End Sub
Works
Dim sURL As String
sURL = "http://www.imdb.com/find?s=all&q=" & Me.Title
FollowHyperlink sURL
End Sub
Works
ASKER
Thanks so much guys for the help