Making a text field a hyperlink on a form

jon98548

Registered User.
Local time
Today, 08:03
Joined
Feb 14, 2003
Messages
141
I have a table with some contact information. One piece of info is a file location. As part of my process, I generate a note with this file location in it. I set the field up as a text field because in the note it becomes an active link. For example, I have a database in \\ServerName\Folder\SubFolder\File. So when I send this note to some one, they click the link and open the db. No problems here.

Now, I use this same field on a form and it isn't active. When I change the property on the form to hyperlink, it acts active but nothing happens.

If I change my text field in my table to hyperlink, it works great on the form. Trouble is, now when I send my note, I get the pound sign on each end of my link and it isn't active there.

My first inclination is to put in another field in the table with the same data in it but make that a hyperlink field for my form. Everything would work OK, but isn't that defeating the purpose of a relational database?

I hope this clear. I'll be glad to give more detail. Thanks.
 
Try this; undo the hyperlink changes you've made to the text box on the form use the DoubleClick event that looks somthing like the following"
Code:
Private Sub Text0_DblClick(Cancel As Integer)
    Shell "explorer " & Me.Text0, vbNormalFocus
End Sub
Change the Text0 to what ever the name of your textbox and see if this will work for you.
 
This worked fine. It acts like its downloading a file and runs a bit slow. Is that just the way it is? Thanks, Ethan.
 
Not as far as I know, I've tried it this morning three different workstations and different OS's and processors and they all pop right up, but I may depend on the server your path is pointing to and the speed of your intranet.

Are you trying to open a File or just open a Folder some where on the network?
 
I'm trying to open a file. I have a databasse in one folder that tracks measures in databases in other folders. So if I see something I need to take care of, I can open that database with my link. This works, but it pops up the File Download window. I click the 'Open from current location' button and there is a time lag in there that makes you think nothing is happening, probably near 60 sec. Then it opens. I'm afraid some of my users will freak out. But I'm going to run with this for now.
 
If that is the case then change your Shell statement to use the application that you are trying to open and the name of the file with complete path like you are already using and maybe it will come up faster.
Code:
Shell "msaccess.exe " & Me.Text0, vbNormalFocus
Shell "excel.exe " & Me.Text0, vbNormalFocus
Shell "notepad.exe " & Me.Text0, vbNormalFocus
as long as it is a registered application you don't need the full application path.

If it is still slow it probably has to do with network or server speed/bandwidth, and that I'm sorry, I can't help you with.
 

Users who are viewing this thread

Back
Top Bottom