Results 1 to 6 of 6
  1. #1
    johnnyBQue is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2014
    Posts
    33

    Linking a hyperlink (texbox) to a Photo

    I may be going about this all wrong but I have a text box that is Hyperlink to a directory that opens fine and gives me access to files that I need. What I want is to place a photo of a particular button I've found (in the form) and on the click event have the hyperlink in the text box activate and open the directory.

    1. I can't change the shape of the text box or place a picture within it...
    2. I can set the pictures control source as the hyperlink text box but that serves no purpose...


    3. I lazy manned it buy making the text box transparent and all the text white then overlay-ed the picture ...it worked but I would like the appropriate way to do this.....being at such a critical stage of my access development......

  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,644
    Try the Hyperlink Address property of Command Button or Image control.

    What is the file type of the image?
    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
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    I'm a bit confused here...

    Where is it you want to put the image, and where is that image to come from? If you want to put the image in a text box, you can't - you have to use an image control. It's easy to make the OnClick event of the image control activate the hyperlink in the text box. Is that what you need to do?

    Please clarify.

  4. #4
    johnnyBQue is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2014
    Posts
    33
    Click image for larger version. 

Name:	document.jpg 
Views:	9 
Size:	8.7 KB 
ID:	18921 I want to use this button photo to activate a "hyperlink" that currently appears in a text box. Now the Photo has a "Click" event so I was trying to bind the click event to the "current" hyperlink that is in the text box. The form containing the hyper linked text box is used to view employee information. The Hyper link itself opens a folder for the employee that is chosen SO the data in the Hyperlink "Changes" this is why I need to link the textbox in order to open the folder currently linked... I just want the user to click a button instead of a "word". The form works great clicking the hyperlink-ed word.

    I was looking for the easiest way to do this...I've very ignorant to Access so if it's easy to link the OnClick event to a hyperlink this information would be most welcome....

  5. #5
    johnnyBQue is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2014
    Posts
    33
    I've tried the hyperlink Address method but it wants to point to a specific file or location which then becomes the default. The hyperlink text box data actually changes between the employee that is being looked at so the address would need to change also. I also tried the hyperlink "Object in This Database" but it wouldn't let me source the hyperlink text box which would have work sweetly... but it only goes "Form" deep not down to the record.

  6. #6
    johnnyBQue is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2014
    Posts
    33
    Okay I figured it out....went into the OnClick event and used Application.FollowHyperlink [controlsource] and I now open the file associated to the particular employee. I had to change the data from Hyperlink in the records table to just text but keep the file path. I now have to figure how not to get an error back if some on clicks the button and there is no data...I get the null error....thanks guys for all your help....I think this was the easy route John_G was implying....

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

Similar Threads

  1. Adding a different Photo per employee record
    By Beamarshall in forum Access
    Replies: 11
    Last Post: 09-26-2014, 11:45 AM
  2. Replies: 3
    Last Post: 09-25-2013, 10:42 AM
  3. Change Photo Depends on combo box value
    By mr_right in forum Access
    Replies: 3
    Last Post: 05-30-2013, 01:48 AM
  4. Replies: 4
    Last Post: 01-05-2013, 11:07 AM
  5. How to set an image for a photo directory
    By eninen7 in forum Access
    Replies: 3
    Last Post: 01-11-2011, 12:24 PM

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