Results 1 to 7 of 7

Thread: Hyperlink field

  1. #1
    Join Date
    May 2005
    Posts
    1,191

    Unanswered: Hyperlink field

    I have a Table with a field that is a Hyperlink type field. I also have a form that is used to add new records to the table. When the user puts in the address (so for instance "C:\Example Folder"), I want to make this the hyperlink text and target location. But instead it is just the text. I tried putting in a "<" and ">" before the text to force to be a hyperlink, but that just changed the text to read "<C:\Example Folder>", and it still wasn't a hyperlink when I went to view it. Anyone know how to program in the hyperlink field? Thank you in advace to anyone who can help.
    Last edited by nckdryr; 07-28-06 at 14:23.
    Me.Geek = True

  2. #2
    Join Date
    May 2005
    Posts
    1,191
    Perhaps I should summarize the above question:

    Does anyone know how to program the display text and the target to a hyperlink field from VB?
    Me.Geek = True

  3. #3
    Join Date
    Jul 2006
    Posts
    108
    hyperlinks fields are kind of weird in that you can click them and type in and then click out, but then when you click it agian it should launch that address.

    is it a local address (on your PC) or is it on the web?

  4. #4
    Join Date
    May 2005
    Posts
    1,191
    It's on the Network
    Me.Geek = True

  5. #5
    Join Date
    Jul 2006
    Posts
    108
    make sure your textbox is formatted as a hyperlink, then check your table. it should also be a hyperlink, then just open the form and key in the web address , once you go outside of that field, that whole field becomes the link.

  6. #6
    Join Date
    May 2005
    Posts
    1,191
    jwalker343,

    Thanks for your help, but I don't think I'm explaining the problem very well.

    I can put the hyperlink field from the table onto a form well enough, then when a user adds a new record and puts the address into this field, it works.

    But what I am trying to accomplish is to have a TEXT field on the form where the user can enter either an address or a keyword. For example, if the user enters in "Vault" into this text field (named "TxtBox_ReqNew_Dum_HP2"), I want the hyperlink field (named "Fld_EWORF_HP2_Location") to then be programmed to have the correct text display, "Vault", and target location, "V:\Released". But if the user wants to type in a specific location, that still works too.

    I am trying to use VB code so that when a button is clicked, the correct information is loaded from the text box into the hyperlink field. This is the chunk of the code that doesn't work:
    PHP Code:
    If Me.TxtBox_ReqNew_Dum_HP2 "vault" Then
        Me
    .TxtBox_ReqNew_Dum_HP2 "V:\released"
    End If
    Me.Fld_EWORF_HP2_Location "<" Me.TxtBox_ReqNew_Dum_HP2 ">" 
    Once again, any help would be appreciated, and if I'm still not making myself clear, let me know.
    Me.Geek = True

  7. #7
    Join Date
    May 2005
    Posts
    1,191
    Looking back at an older dB, I found the problem:

    I was using the wrong char, it should have been a "#" instead of a "<" and a ">".

    For anyone who's wondering a similar problem you can use this code (or something like it):
    PHP Code:
    me.Fld_Hyperlink strTextDisplay "#" strReportPath "#" 
    Me.Geek = True

Posting Permissions

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