?
Solved

Hyperlink in Access

Posted on 2011-05-07
10
Medium Priority
?
499 Views
Last Modified: 2012-06-27
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?
0
Comment
Question by:Mark Wood
  • 5
  • 3
  • 2
10 Comments
 
LVL 85
ID: 35714121
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
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 35714281
<then pull the text from my title field and place it here.>
?
0
 
LVL 2

Author Comment

by:Mark Wood
ID: 35715385
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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 85
ID: 35715398
build the string like this:

Dim sURL as String

sURL =  "http://www.imdb.com/find?s=all&q=" & Me.YourTextField
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 35715771


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
 
LVL 2

Author Comment

by:Mark Wood
ID: 35716658
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
 
LVL 85

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
ID: 35716719
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
 
LVL 2

Author Comment

by:Mark Wood
ID: 35716775
throws a compile error on Private Sub Command27_Click()
0
 
LVL 2

Author Comment

by:Mark Wood
ID: 35716797
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
 
LVL 2

Author Closing Comment

by:Mark Wood
ID: 35716804
Thanks so much guys for the help
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
Sometimes MS breaks things just for fun... In Access 2003, only the maximum allowable SQL string length could cause problems as you built a recordset. Now, when using string data in a WHERE clause, the 'identifier' maximum is 128 characters. So, …
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question