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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Edit Hyperlink browse to C drive

Status
Not open for further replies.

nastar1

Technical User
Nov 1, 2005
122
US
I'm using the Edit Hyperlink on a form and one user is getting an odd display of ..\..\..\filename.ext when selecting any file from the C: drive. Rather than the full path.

Any other selection of a file from a server, etc. returns the full path and filename.

This is the only machine that exhibits this behavior. Any ideas what the cause is?
 
Did you find a solution to your problem? I'm experiencing the same thing.

Thanks.
 
Hello vlingen,

I tried and tried all kinds of variations of the hyperlink commands, but nothing worked. I finally broke down and implemented the Open File Dialog code in the link below.


This worked perfectly. It looked awful daunting to me, but the code works.

Let me know if you'd like to see any of my code for examples of how I used it for my app.
 
but dose it open the file that you want

in form design view right click on the hyperlink and change the text to display

to do in code
Code:
me.Label0.Hyperlink.TextToDisplay ="xxx"
 
pwise,

What it does is open a File Open Dialog box that allows the user to browse to and select the file of choice. From my experience it is far and away more stable/reliable than the InsertHyperLink method. In fact, I could not get help anywhere to get the hyperlink method to work consistently thus forcing me to look for a solution elsewhere.
Once the file is selected normal coding can be used to do whatever you need with the file. In my case, I continued to store it as a hyperlink in a textbox so users could open and edit word documents located on a network drive.
I only needed to apply the code below to keep the string format correct for what I was doing with it.
Me.TaskDescrip = "#" & strInputFileName & "#
 
What I meant to ask is when the Hyperlink displays ..\..\..\filename.ext does it open the correct file
 
pwise,

No, the file will not open if that corrupted filepath is displayed. I could never determine what the cause was and could find no assistance or info on it anywhere on the net.

Oddly, the corrupted filepath would occur somewhere like 80% of the time in my experience. The correct UNC filepath would display sometimes and the file would indeed open normally. I tried to write code to handle the 'corrupted' filepath string but never could get anything to work successfully. This is not to say a more astute programmer couldn't write some string handling code to catch that bad filepath. I'm just not strong enough in programming to succeed at that, despite believing that it can be done.

There must be some kind of bug in the logic of the InsertHyperlink method.
 
I have never found hyperlink fields to be satisfactory. I prefer to use Followhyperlink in a suitable event.
 
Remou:

I have not used hyperlink much so I don"t relly know if it is satisfactory. What type of problem have you had with it
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top