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

Creating links to open files? 1

Status
Not open for further replies.

fiel

Programmer
Jun 3, 2007
96
US
If I have have a form that stores records on various program codes (most would be saved in text pad files), is there a way to link the actual files to my database and open them through Access?
 
There is a Hyperlink datatype for fields... You could store hyperlinks to the files and then click on the hyperlink and it would open.

Also you could use Shell to open the program but be warned shell runs asynchronusly (you code contiues in parallel instead of waiting).
 
I have used hyperlink fields in the past and they can be a nuisance. I do not use them anymore, however they still may suit.
 
Is there a way to set the hyperlinks so that when a user creates a new record in a text box, the hyperlink menu would come up and the text written in the textbox would become the hyperlink?
 
I've tried setting a textbox to ishyperlink = true, but is there a way to do this and have the 'insert hyperlink' menu come up so I can select the files I want to link?
 
It really is much easier to use a text field, followhyperlink in a suitable event, and browse for file to fill in the data.
 
I'm not sure how, but how acn I get to the oint where I would be able to browse for data. In my MenuTable, I created new field for hyperlinks. I've set the query to link it with the rest of my information, the only thing now is how can I set it to browser for file to fill in data?
 
In my textbox for the hyper links, the only way I can have a menu come up for me to browse for files is if I go to : Insert > Hyperlink. Is there a way I can have Access do this automatically?
 
Provided the TextBox has the focus you may try this:
DoCmd.RunCommand acCmdInsertHyperlink

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
I'd suggest you try PHV's code either on the GotFocus event of the textbox (run if the texbox is empty) or it's doubleclick event.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top