Results 1 to 3 of 3
  1. #1
    Super Moderator WebGenii's Avatar
    Join Date
    Jan 2001
    Location
    Redcliff, Alberta, Canada
    Posts
    4,066
    Thanks
    2
    Thanked 5 Times in 5 Posts

    Set Hyperlink to a Form (Access 2003/SP3)

    Here is an annoying problem.
    I have a table, in this table is a Hyperlink field. The hyperlink field can contain hyperlinks to documents, websites OR forms within the db. These forms contain user help information.
    When you add hyperlink data to a table you don't see the "Object In This Database" option in the Insert Hyperlink dialogue box.
    To get around this problem, I created a form that lists the forms in the db, and allows the user to select the form they wish to create a link to.
    All fine so far.
    Now the annoying part.
    The link when created this way, doesn't function as a link. I can go into the table and edit the the link as follows:
    #Form[space]FormName and the link will call up the Form perfectly.
    However, when I use code to write the value, the process edits out the # and [space] (even when I use the character codes).

    The following is the code I'm using to write the value.
    Private Sub btn_OK_Click()
    Dim strHyperlinkForm As String
    strHyperlinkForm = Chr(35) & "Form" & Chr(32) & Me.FormNameSelect.Value
    Form_frm_HelpText.Hyperlink.Value = strHyperlinkForm
    DoCmd.Close
    End Sub

    Any suggestions?
    [b]Catharine Richardson (WebGenii)
    WebGenii Home Page
    Moderator: Spreadsheets, Other MS Apps, Presentation Apps, Visual Basic for Apps, Windows Mobile

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Set Hyperlink to a Form (Access 2003/SP3)

    > When you add hyperlink data to a table you don't see the "Object In This Database" option in the Insert Hyperlink dialogue box.

    <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>
    Attached Images Attached Images

  3. #3
    Super Moderator WebGenii's Avatar
    Join Date
    Jan 2001
    Location
    Redcliff, Alberta, Canada
    Posts
    4,066
    Thanks
    2
    Thanked 5 Times in 5 Posts

    Re: Set Hyperlink to a Form (Access 2003/SP3)

    Correct, but I found the answer in some of your old posts.
    I needed two ## in my string
    as follows:
    strHyperlinkForm = Chr(35) & Chr(35) & "Form" & Chr(32) & Me.FormNameSelect.Value
    [b]Catharine Richardson (WebGenii)
    WebGenii Home Page
    Moderator: Spreadsheets, Other MS Apps, Presentation Apps, Visual Basic for Apps, Windows Mobile

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •