Results 1 to 6 of 6
  1. #1
    JeffG3209 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2011
    Location
    Weatherford, Texas
    Posts
    66

    Exact Match Hyperlink

    I use hyperlinks to search the internet for various information on my form.


    Code:
    ="http://www.google.com/search?q=" & [FULL NAME] & " " & [CITY]
    I usually end up having to manually modify my Google search like this. "Susan Jones" Dallas Texas

    If I don't do this I will get a ton of other Jones names that are irrelevant. Is there anyway to add the "" to a search around a field?

    I have tried "[FULL NAME]", but that obviously will not work.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    This is a shot in the dark, but try

    ="http://www.google.com/search?q='" & [FULL NAME] & "' " & [CITY]

    If that doesn't work try

    ="http://www.google.com/search?q=" & Chr(34) & [FULL NAME] & Chr(34) & " " & [CITY]
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    JeffG3209 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2011
    Location
    Weatherford, Texas
    Posts
    66
    ="http://www.google.com/search?q=" & Chr(34) & [FULL NAME] & Chr(34) & " " & [CITY]
    Nada

    ="http://www.google.com/search?q='" & [FULL NAME] & "' " & [CITY]
    Result = 'Susan Jones' HOUSTON
    Very Close! Can I add two apostrophes somehow?

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    What did the first one return? Chr(34) is the double quote ("), so that should have worked. In a brief test this:

    ="http://www.google.com/search?q=" & Chr(34) & "Paul Baldy" & Chr(34) & " Vegas"

    resulted in:

    http://www.google.com/search?q="Paul Baldy" Vegas

    I suppose you can try

    ="http://www.google.com/search?q=""" & [FULL NAME] & """ " & [CITY]

    Tripling up on the quotes I think makes it return a single.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    JeffG3209 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2011
    Location
    Weatherford, Texas
    Posts
    66
    ="http://www.google.com/search?q=" & Chr(34) & [FULL NAME] & Chr(34) & " " & [CITY]

    It's not opening the browser. I can see the form working pointer icon when I press the link though.

  6. #6
    JeffG3209 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2011
    Location
    Weatherford, Texas
    Posts
    66
    Figured it out. Hope this helps the next guy.

    The correct syntax for using "anything" is %22anything%22.

    http://www.google.com/search?q=%22anything%22+[your field name]

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 02-08-2011, 10:25 AM
  2. Replies: 4
    Last Post: 01-31-2011, 03:19 PM
  3. Match and Consolidate
    By Yap in forum Access
    Replies: 3
    Last Post: 12-16-2010, 04:26 PM
  4. Query to match ID's
    By Shag84 in forum Access
    Replies: 2
    Last Post: 09-06-2009, 08:13 PM
  5. set an exact size for a group section?
    By Coolpapabell in forum Reports
    Replies: 0
    Last Post: 08-21-2009, 08:26 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums