Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hyperlink Problem 1

Status
Not open for further replies.

infinitx

Technical User
Feb 26, 2004
212
US
Hi,

I have an "Add Graphic" form which lets the user find the image they need using a hyperlink. I also want the hyperlinked image to be displayed in an Image Box. I use the following code:

Code:
Me![Image].Picture=Me![Hyperlink]

This code is put in the forms OnCurrent Event.

The problem is that when the user uses the hyperlink, the text that shows up is like: "..\..\..\Image\Image1.jpg". The image's actual address is : "C:\Image\Image1.jpg".

How can the hyperlink show: "C:\Image\Image1.jpg" instead of "..\..\..\Image\Image1.jpg"?

Thanks, Alex
 
why have an hyperlink why not just have a text box and an image box
use the code below to use the oncurrent event
if Not (IsNull(textboxname)) Then
Me!ImgPicture.Picture = Me!textboxname
End If

fill the textbox with "C:\Image\Image1.jpg".


Hope this helps
Hymn
 
Hi Hymn,

I want the user to be able to choose which file they want to add without really knowing the full path of the image.

Textbox could have C:\Image\Image1.jpg or it could have any other image that they want to.
 
do a search on Common Dialog there you will find away to look for the jpg and input it in the text field

Hope this helps
Hymn
 
Hi,

I tried that, but that is not what I am looking for. (for some reason the OLE/DDE Links does not become enabled, it is always disabled)

I am wondering if there is a way to have the hyperlink display the "absolute path" (I think that is what its called) instead of the "relative path"

Example:

Absolute Path: "C:\Image\Image1.jpg"
Relative Path: "..\..\..\Image\Image1.jpg"

I want it to display the absolute path with every graphic that the user adds.

Thanks,
Alex
 
Hi again,

Could there be another alternative to this?

This is what I have in mind:

Have a dialog box that lets the user choose which picture they want to add. The prorgam could then automatically take that picture's "absolute path" and paste it into a hyperlink text box or a regular text box.

Is what I am thinking of possible or am I just dreaming?

Thanks again,
Alex
 
Thanks a lot Hymn,

I found the sample program I need on the site you gave me!

Alex
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top