Results 1 to 7 of 7
  1. #1
    netsense is offline Novice
    Windows 11 Office 365
    Join Date
    Oct 2022
    Location
    Near Wollongong, NSW, Australia
    Posts
    9

    Importing hyperlinks

    Hi all



    I have a database of 475 plant species, each of which [should] have 4 active hyperlinks to pages on other sites.

    I imported these links from an Excel file into a table where the link text fields were set as Hyperlinks, then used an Update Query to bring them into the main table - in this, too, the fields were set to be Hyperlinks.

    In the table view (and the associated form view) they show up blue and underlined, and the text within is the correct URL; however, they do not work as hyperlinks. If I copy the text into an empty short text field, then re-select and copy back - then they work as hyperlinks, but I really don't want to be doing that 1,900 times.

    Is there a way to correct this issue?

    Thanks in advance

    Edwin

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,822
    A hyperlink in Access is composed of 3 parts separated by # character. Microsoft Access tips: Introduction to Hyperlink fields (allenbrowne.com)
    The import from Excel does not have this structure. Copy/paste of URL into Hyperlink field adds the # characters.

    Run an UPDATE action on the hyperlink field.

    UPDATE table SET HL = "#" & HL & "#"

    I don't like Hyperlink field and don't use it. I build hyperlink when needed with same expression used in UPDATE action.
    Or use FollowHyperlink method
    Avoiding The FollowHyperlink Security Warning (devhut.net)
    Or Shell Run command.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    netsense is offline Novice
    Windows 11 Office 365
    Join Date
    Oct 2022
    Location
    Near Wollongong, NSW, Australia
    Posts
    9
    Hi June7

    Thanks for the information.
    I'm no database expert, and it's a long time since I've used SQL, and never in Access, so I'm a bit lost on how to run this action. I did try to enter it into an SQL Windows, but I just got a popup asking for a value.
    All the Updates I've run have used the Query Design grid.
    Can you clarify how I should do this, or point me to a web resource that does?
    Thanks,
    Edwin

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,822
    Go ahead and use query design grid. Select UPDATE query. Under the hyperlink field place the expression that concatenates. Certainly use your table and field names.

    Or paste the SQL I provided into SQLView and replace with your table and field names.

    It's really a very simple SQL.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    netsense is offline Novice
    Windows 11 Office 365
    Join Date
    Oct 2022
    Location
    Near Wollongong, NSW, Australia
    Posts
    9

    Unhappy

    So I used the grid to update the one of the hyperlink fields in the table.
    Click image for larger version. 

Name:	screenshot.png 
Views:	14 
Size:	7.7 KB 
ID:	49030
    Copied and pasted that SET HL = "#" & HL & "#" string into the "update to" row. It automatically became "SET HL"="#" & "HL" & "#"; when I ran the query, and it converted all the hyperlinks to "0".

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,822
    All you put under the field is: "#" & [Wikipedia link] & "#"

    Then switch to SQL View to see the SQL.


    Strongly advise not to use spaces in naming convention.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    netsense is offline Novice
    Windows 11 Office 365
    Join Date
    Oct 2022
    Location
    Near Wollongong, NSW, Australia
    Posts
    9
    Hi June7

    It's worked - thank you so much. I've also learned more about Access, which is not entirely a bad thing.

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

Similar Threads

  1. Hyperlinks
    By cbrsix in forum Reports
    Replies: 1
    Last Post: 12-18-2015, 09:47 AM
  2. hyperlinks
    By sdel_nevo in forum Programming
    Replies: 2
    Last Post: 06-11-2013, 02:34 PM
  3. Hyperlinks (UNC)
    By ccordner in forum Forms
    Replies: 1
    Last Post: 02-01-2012, 02:16 PM
  4. Help with hyperlinks
    By dumbFounded in forum Access
    Replies: 4
    Last Post: 04-26-2011, 01:40 PM
  5. Hyperlinks
    By Issy in forum Access
    Replies: 0
    Last Post: 11-13-2007, 04:46 PM

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