Attaching Files to Access DB

Altin

Registered User.
Local time
Yesterday, 16:47
Joined
Mar 5, 2010
Messages
16
I have a database in which users regularly attach extra files to the records they are entering. At the moment they save the extra file to a designated directory on the network (G:\Central Store\Attachments\2012) & then go into the database & make the link. I have a command button which creates a hyperlink, but it means opening a Create Hyperlink window, navigating to the directory & choosing their file from the other 50 or so records also saved there. It works but I was wondering if there is a more user friendly way of doing it.

What I would like to be able to do is have the user click a command button & navigate to where the record is saved on their own PC, say their desktop, & select their file. When they click OK to attach it, Access will copy this file & drop a copy into the network directory & hyperlink to that copy. This would make it easier to select the file if it is on your own desktop rather than in a directory of many others & would remove the potential to attach the wrong file. It would also stop users having to go into that directory & potentially remove/rename files, leading to problems for other records later on.

Is this something that Access could do at all?

The current code for my Attach button is:
Code:
Private Sub cmdAttach01_Click()
On Error GoTo ErrorHandler

Me.Attachments1.SetFocus
   RunCommand acCmdInsertHyperlink
CleanUpAndExit:
Exit Sub

ErrorHandler:

Resume CleanUpAndExit

End Sub
 

Users who are viewing this thread

Back
Top Bottom