Results 1 to 2 of 2
  1. #1
    dwmackay is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2011
    Posts
    2

    Creating a Hyperlink

    Greetings,



    I am not a programmer, but have built myself a sales territory management database. I am trying to create a link to google maps from the company address. I store the address, city, state and zip in seperate fields in a single table (Main). I found the correct syntax for google maps addresses, but I cannot get it to work.

    The syntax for google maps is: "http://maps.google.com/maps?hl=en&q=" followed by the address and zip.

    I created a Control (Text 149) and set the data value as "=' http://maps.google.com/maps?hl=en&q=' & [Addr1] & ', ' & [Zip Code]". This produces the correct syntax, but it is not stored as a hyperlink. If I copy the resulting control and paste it into a browser, the syntax is correct and it takes me to google maps and the address.

    For some reason, I cannot get this to be a hyperlink, just text. I set the properties of the Test 149 to Is Hyperlink: Yes, Display as Hyperlink: Always. But it does not work. I can click on it, but it only selects the underlined text, it does not launch the browser.

    Now for the strange part. I added a field to the Main table in the database to add a Google map hyperlink address. I set that as a hyperlink and stuffed the Text 149 into the table using Set Value when the form is opened. That too does not work. It puts the value no the new Google field, but it is only text not a hyperlink. However, if I manually copy and paste Text 149 into the Google field, it works as a hyperlink. So it is the same data, it just starts working when I copy and paste.

    Any help is appreciated.

    Doug M.

  2. #2
    tdecker81 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Sep 2011
    Posts
    23
    http://www.access-programmers.co.uk/...d.php?t=104421

    I used this code and made the openwebpage into a module function so i could use it from anywhere in access just by passing the url i want it to open.

    Then added a label to the form that has the address info i needed. In the on click event of that label i added code to store the url with the address info like you have shown above as the data value. Pass that variable into the function and it should work. Post back if you're still having trouble. I have example code but not here on this computer.

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

Similar Threads

  1. Replies: 12
    Last Post: 12-14-2011, 08:04 PM
  2. Problem creating hyperlink to a sub macro
    By AccessOAP in forum Programming
    Replies: 2
    Last Post: 08-15-2011, 08:05 AM
  3. Replies: 4
    Last Post: 01-31-2011, 03:19 PM
  4. Where is the hyperlink....
    By amer in forum Queries
    Replies: 1
    Last Post: 06-09-2010, 12:06 PM
  5. Hyperlink Help
    By smikkelsen in forum Access
    Replies: 9
    Last Post: 03-12-2010, 11:28 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