PC Review


Reply
Thread Tools Rate Thread

Attach File Function

 
 
justin.poole@gmail.com
Guest
Posts: n/a
 
      30th Aug 2006
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?

 
Reply With Quote
 
 
 
 
pietlinden@hotmail.com
Guest
Posts: n/a
 
      30th Aug 2006

justin.po...@gmail.com wrote:
> 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

 
Reply With Quote
 
pietlinden@hotmail.com
Guest
Posts: n/a
 
      30th Aug 2006
found it...
http://vbnet.mvps.org/code/network/u...appeddrive.htm

 
Reply With Quote
 
Dirk Goldgar
Guest
Posts: n/a
 
      30th Aug 2006
<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)
> 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

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)


 
Reply With Quote
 
justin.poole@gmail.com
Guest
Posts: n/a
 
      30th Aug 2006
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...)


Dirk Goldgar wrote:

> <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)
> > 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
>
> --
> Dirk Goldgar, MS Access MVP
> www.datagnostics.com
>
> (please reply to the newsgroup)


 
Reply With Quote
 
pietlinden@hotmail.com
Guest
Posts: n/a
 
      30th Aug 2006

you could try this:

http://www.mvps.org/access/api/api0001.htm

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Send to function wont open WinMail and attach pdf from adobe application. I know this can be accomplished by right clicking on the pdf file but I need the application to do the task. Any suggestions? DonE Windows Vista Mail 2 8th Jul 2008 02:39 AM
why when i attach a word file does it attach itself as a dot file. =?Utf-8?B?YnJpYW4=?= Microsoft Outlook Discussion 1 23rd Jan 2005 05:44 AM
How to attach function to a custom Menubar? Malcom Jazz Microsoft Excel Programming 1 1st Nov 2004 08:48 AM
How to attach function to a custom Menubar? Malcom Jazz Microsoft Excel Programming 0 29th Oct 2004 02:27 PM
Unable to attach file using send to function Microsoft Outlook 1 13th Jul 2004 01:52 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:47 PM.