INSERT INTO statement with hyperlink

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bbatson
    New Member
    • Sep 2007
    • 46

    INSERT INTO statement with hyperlink

    Hello,

    Suppose I have a table called "Links_Tbl" with a column titled "Link" and a text box on a form called "txtlink".

    I am finding that the following code is not making the uploaded links active:

    Code:
    sqlinsert = "INSERT INTO Links_Tbl (Link) VALUES ('" & me.txtlink & "');"
    db.execute(sqlinsert)
    It uploads the text just fine but when the links are displayed on subform in datasheet view, clicking on them does nothing. If I input the link directly into the table (not through the code above) the links are active.

    Any suggestions as to how to make the links active when using the code above?

    Many thanks!

    -Brian
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32662

    #2
    What type of field is [Link]?

    What is different in the table between the values uploaded by your code and those entered into the table via the form?

    Comment

    • bbatson
      New Member
      • Sep 2007
      • 46

      #3
      [Link] is a hyperlink field. I can't tell a difference.

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32662

        #4
        I tried it out in the end.

        All strings were shown formatted as links (however they were added), but none worked unless the string included the preamble (http://).

        We're all used to using modern browsers which guess this for you, but the correct full format of a link is required for it to work from Access.

        This would all I could find to help I'm afraid.

        Comment

        Working...