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?
LVL 2
Mark WoodNetwork AdministratorAsked:
Who is Participating?
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Connect With a Mentor Infotrakker SoftwareCommented:
Try this:

Private Sub Command27_Click()
  Dim sURL as String
  sURL =  "http://www.imdb.com/find?s=all&q=" & Me.txtMovieTitle
  FollowHyperlink sURL
End Sub
0
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
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.
0
 
Jeffrey CoachmanMIS LiasonCommented:
<then pull the text from my title field and place it here.>
?
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Mark WoodNetwork AdministratorAuthor Commented:
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.
0
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
build the string like this:

Dim sURL as String

sURL =  "http://www.imdb.com/find?s=all&q=" & Me.YourTextField
0
 
Jeffrey CoachmanMIS LiasonCommented:


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
0
 
Mark WoodNetwork AdministratorAuthor Commented:
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.FollowHyperlink Me.txtMyMovieTitle
End Sub

Private Sub txtMovieTitle_MouseMove(Button 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
0
 
Mark WoodNetwork AdministratorAuthor Commented:
throws a compile error on Private Sub Command27_Click()
0
 
Mark WoodNetwork AdministratorAuthor Commented:
Private Sub Command27_Click()
  Dim sURL As String
  sURL = "http://www.imdb.com/find?s=all&q=" & Me.Title
  FollowHyperlink sURL
End Sub

Works
0
 
Mark WoodNetwork AdministratorAuthor Commented:
Thanks so much guys for the help
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.