Results 1 to 4 of 4
  1. #1
    ortizgabe is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    Jun 2014
    Posts
    8

    Dafault hyperlink text


    Hello, I finally figured out how to have users drag and drop a document into a text box within a form and have it create a hyperlink. What I need to know now, is if there is a way that when a file is dropped into the text box, it only shows the icon associated with that file, or at the very least, edit the hyperlink to only show a certain text. The files I need to see are all in a networked drive, so the hyperlink addresses can be quite long, and ultimately I'd just like the hyperlink to say "letter". Showing the icon would be a plus.

    Thanks for any help!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    How do you do 'drag and drop'? This is saved into a text type field? A true hyperlink would be saved into a hyperlink type field and be composed of 3 parts, any of which can be edited by code or through the hyperlink dialog. Review: http://www.allenbrowne.com/casu-09.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
    ortizgabe is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    Jun 2014
    Posts
    8
    Thanks for the reply! So what I did was create a new column in my table and designated it as a Hyperlink in data type. Then I created a text field in my form and made the control source the column I just created. This allowed me to dag and drop my file from explorer into the text field and it creates a hyperlink to the location for me. I took a look at your reference, but to me it seems like that is used to changed the hyperlinks one at a time, I'd like it to happen as soon as the file is dropped into the text field. Unless what you are saying is that I can put those variables somewhere on my database, I just don't know where that would be.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Would have to use VBA code to modify the hyperlink string that is saved. Trick is figuring out what event to put the code into. Probably the textbox AfterUpdate. The following worked for me:

    Dim aryH As Variant
    aryH = Split(Me.textboxname, "#")
    Me.textboxname = InputBox("enter display text") & "#" & aryH(1) & "#" & aryH(2)
    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.

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

Similar Threads

  1. Default Hyperlink Text
    By mrmims in forum Forms
    Replies: 4
    Last Post: 07-07-2015, 04:17 PM
  2. Replies: 3
    Last Post: 09-25-2013, 10:42 AM
  3. Combo box dafault display value !!!
    By Kazim in forum Access
    Replies: 1
    Last Post: 02-28-2011, 09:31 AM
  4. importing hyperlink with text
    By Mak_kap in forum Import/Export Data
    Replies: 9
    Last Post: 02-10-2011, 07:38 PM
  5. have hyperlink use own name/text
    By airhud86 in forum Access
    Replies: 1
    Last Post: 12-16-2009, 09:35 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