Results 1 to 7 of 7
  1. #1
    floyd is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2013
    Posts
    66

    Button, Image or Lext Box to access "Hyperlink field"

    I think this is easy.

    I have a field in a Table (tblMainFile) named "FileLocation" which contains a hyperlink for each of the files.



    Here is the problem / question

    I have a continuous form (from a query) which displays information from the tblMainFile table.

    As it stands right now, the form shows a textbox (with the hyperlink) which is clickable to take them to the link location.

    I would like to have a button which says (GET FILE) or a different text box which simply says "Get File" as opposed to the entire hyperlink.

    I know this is simple, but I can't figure it out and my searched have left me empty.

    Thank you for the help.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Is the field defined as a Hyperlink type? You can put whatever text you want into the hyperlink description part.

    Review:
    http://www.allenbrowne.com/casu-09.html
    http://allenbrowne.com/func-GoHyperlink.html
    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
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    In the new button's click event, where ControlName = New Button's Name and ControlWithPath = your text box with the full path

    Code:
    Dim strLink As String
    strLink = Me.ControlWithPath.Value
    Me.ControlName.HyperlinkAddress = strLink

  4. #4
    floyd is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2013
    Posts
    66
    Quote Originally Posted by June7 View Post
    Is the field defined as a Hyperlink type? You can put whatever text you want into the hyperlink description part.

    Review:
    http://www.allenbrowne.com/casu-09.html
    http://allenbrowne.com/func-GoHyperlink.html
    Where would I find this?
    I have been in the FORM and TABLES and I can't figure out where this would go.

    Thank you for the help!

  5. #5
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    What are you looking for - the Hyperlink property of field or where to put code?

    As ItsMe suggested, put code behind button in VBA click event procedure.
    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.

  6. #6
    floyd is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2013
    Posts
    66
    That worked PERFECTLY!!!!

    THANK YOU!!!

  7. #7
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    Glad you got it solved

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

Similar Threads

  1. Replies: 3
    Last Post: 04-22-2013, 06:08 AM
  2. Replies: 8
    Last Post: 10-24-2012, 12:47 PM
  3. Replies: 11
    Last Post: 03-29-2012, 02:32 PM
  4. Replies: 0
    Last Post: 01-11-2012, 12:34 PM
  5. Replies: 16
    Last Post: 07-22-2011, 09:23 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