View Single Post
  #4  
Old February 10th, 2005, 05:22 PM
Tony Vrolyk
external usenet poster
 
Posts: n/a
Default

Maybe call the the Save dialog as described here
http://www.mvps.org/access/api/api0001.htm



"Spence" wrote in message
...
The code for "API: Start an app with ShellExecute" seems to be the
closest I
can find for what I want to do. However, is there a way to change the
code
to ask where to save the file vice what app should be used to open the
file?

I'm assuming the "varTaskID = Shell("runndll32.exe shell32.dll,
OpenAs_RunDLL "_
& stFile, WIN_NORMAL) line can be changed to do this but so far, haven't
found the correct syntax.

Thanks,

Spence

"Tony Vrolyk" wrote:

I find hyperlinks to local file to be a pain to work with especially if
you
have to manually edit them. And as you have found they act a certain way
and
that may not be how you want them to act. I use simple text fields to
store
file locations and then on a form I can use code to erify the file exists
and then handle it anyway I want.

In your case you could have buttons on the form for Save and Open and
handle
the file how you want. There is code floating aroung the Access groups
and
on the Access Web - http://www.mvps.org/access/index.html - that you can
use
for opening files in their default app, selecting folders, etc. You can
use
a simple If Dir(Me.txtFile) "" Then command to verify existance.

If you would like more code samples let me know

Tony V




"Spence" wrote in message
...
I'd like to create a table that has two/three fields. 1) a description
of
what the linked file is and 2) the hyperlink to the file. I'll have
one
more
field to identify to a primary record from another table.

With hyperliniks (as far as I can tell right now), it tries to open a
file
right after the hyperlink has been clicked. I have a problem with that
since
some files are not in a format that can be read by regular software.
What
I'd like to do is once the hyperlink is clicked, have the program pop
up a
message window asking wether to open or save this file to disk.

Would there be a fairly easy way to do this?

Spence