Hi, Is it possible to attach files to a record, ie, we have a requirement whereby a person wants to add say a pdf or jpg file to a clients record, is this possible, if so how would i go about achieving it.
What I do is provide a table that contains a field of hyperlinks. Then the user can copy and paste the Windows address of the file or folder into the field in the database, and it's linked. Prevents you from having to store the file itself and bloating your table, and accomplishes the same thing.
Using a blob field in an Access database to store a file such as a JPG, PDF or DOC is going to increase the size of your database quite substantially.
With the file size limit of 2Gb for an MDB file this could be reached quite quickly if you have a lot of records.
A better way is to store the path to a file in a text field, then actually save them in a network shared folder so all the database contains is a field in a table containing something like \\Server\MyApp\Files\Somefile.txt
You then have a button that uses ShellExecute to open the file with whatever the default app is to handle that particular file format.
Both sound very good, i wasnt aware of the 2GB limit, thanks.. how would i go about storing the hyperlinks to a text field, got to make this as easy as possible. I like the idea of a network share, so when the user next time goes to the record and clicks the attachment the file should open in the default application.. sounds good
"A better way is to store the path to a file in a text field, then actually save them in a network shared folder so all the database contains is a field in a table containing something like \\Server\MyApp\Files\Somefile.txt
You then have a button that uses ShellExecute to open the file with whatever the default app is to handle that particular file format."
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.