Bob Quintal said:
Any comments on the use of one or the other in a form that opens a
linked file?
or on other methods like fHandleFile by Dev Ashish?
Reason I ask: I need to make some changes in a database originally
created in Access 2, then upgraded to '97 then upsized to a SQL server
back end, and the front end upgraded to Access 2003.
A lot of the code is archaic. some behaves erratically.
Do you mean "Application.FollowHyperlink"?
Where hyperlinks or file paths to be opened are data -- as opposed to static
links on forms, as for example links to help pages -- I don't use hyperlink
addresses or hyperlink fields as such. I store the URL in a text field and
either use Application.FollowHyperlink or fHandleFile (the Windows
ShellExecute API) to open the URL as appropriate. The reason I don't use
the Hyperlink field type is that editing it becomes complicated, since what
you usually see is the display text, not the actual hyperlink address.
I don't have any strong opinion about whether to use FollowHyperlink or
ShellExecute to follow such a link. My natural inclination would be to use
FollowHyperlink for an http: URL, and ShellExecute to open a file with the
registered application. FollowHyperlink does generally work for that, too;
however, if the filetype can be displayed by the user's web browser, then
FollowHyperlink will usually display it in the web browser rather than the
registered application. So if I really want to guarantee that the file is
opened in the registered application for that filetype, I'll use
ShellExecute rather than FollowHyperlink.