A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Design a table to include external file links



 
 
Thread Tools Display Modes
  #1  
Old February 8th, 2005, 09:31 PM
Spence
external usenet poster
 
Posts: n/a
Default Design a table to include external file links

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
  #2  
Old February 9th, 2005, 09:55 PM
Tony Vrolyk
external usenet poster
 
Posts: n/a
Default

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



  #3  
Old February 10th, 2005, 04:41 PM
Spence
external usenet poster
 
Posts: n/a
Default

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




  #4  
Old February 10th, 2005, 06: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






 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Update - If statement Dan @BCBS Running & Setting Up Queries 13 December 14th, 2004 07:02 PM
Autonumber Ally H. General Discussion 7 August 27th, 2004 04:51 PM
Office 2003 uninstall/reinstall problems Jerryn3 Setup, Installing & Configuration 2 August 2nd, 2004 03:39 PM
Application must be installed to run Error Keith Setup, Installing & Configuration 1 June 29th, 2004 03:02 AM
Table design for a booking system Brian C Database Design 2 April 27th, 2004 03:11 AM


All times are GMT +1. The time now is 11:33 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.