Attach File Function

J

justin.poole

Hi,

I am trying to create an attach file function on a form in Access 2002.
Basically this would allow the user to open a file browser, select the
file they want to attach to a record and something in the form would
allow them to click on the file they attached and it would just open
up.

Are hyperlinks the best way to go about this?

1. Lets say I use an open file browser (like
http://www.mvps.org/access/api/api0001.htm)
2. File selected --> from this I get the filepath and file name and
store it in hyperlink field in the current record.
3. This enables a button which references the hyperlink.

Can anyone think of a better way? Has anyone seen/have an example of
this being done before?
 
P

pietlinden

Hi,

I am trying to create an attach file function on a form in Access 2002.
Basically this would allow the user to open a file browser, select the
file they want to attach to a record and something in the form would
allow them to click on the file they attached and it would just open
up.

Are hyperlinks the best way to go about this?

1. Lets say I use an open file browser (like
http://www.mvps.org/access/api/api0001.htm)
2. File selected --> from this I get the filepath and file name and
store it in hyperlink field in the current record.
3. This enables a button which references the hyperlink.

Can anyone think of a better way? Has anyone seen/have an example of
this being done before?

sounds good. I'd just store the UNC path to the file. I'm sure
there's code at AccessWeb or Randy Birch's site. I think it's
http://www.mvps.org/vbnet
 
D

Dirk Goldgar

Hi,

I am trying to create an attach file function on a form in Access
2002. Basically this would allow the user to open a file browser,
select the file they want to attach to a record and something in the
form would allow them to click on the file they attached and it would
just open up.

Are hyperlinks the best way to go about this?

1. Lets say I use an open file browser (like
http://www.mvps.org/access/api/api0001.htm)
2. File selected --> from this I get the filepath and file name and
store it in hyperlink field in the current record.
3. This enables a button which references the hyperlink.

Can anyone think of a better way? Has anyone seen/have an example of
this being done before?

I find hyperlink fields cumbersome to deal with. I'd rather just use a
text field, and have the button execute the FollowHyperlink method using
the text of the field; e.g.,

Application.FollowHyperlink Me!txtFilePath
 
J

justin.poole

Thank you for your help.

Is there anyway to use a different file browser than "open" and "save
as"? (i.e. something like "attach" would be great...)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top