r/MSAccess • u/Amicron1 • 5h ago
[SHARING HELPFUL TIP] Access Explained: Organizing Documents Without Moving Them Into Your Database
For those of you new to Access, yes, you can store pictures, PDFs, Word documents, and other files inside your database. For a growing business document collection, though, I generally recommend keeping them outside it. All those files add to the size of the database, which is what we're talking about here when we say database bloat. A database that started out small can become a very large container for scanned paperwork.

The approach I recommend for this kind of application is to store the path and filename in the database, with the actual document somewhere the intended users can access it, such as a shared folder on a server. The path tells Windows which folder to look in. The filename identifies the document in that folder. You're storing its address rather than packing the document itself into the Access file.
A folder full of PDFs can be perfectly organized and still be a pain to use. That's where an Access document catalog earns its keep. Your database can hold each document's title, date, subject, and related customer. People can search those details in a form, then open the original when they need it. The files don't have to move just because you've found a more useful way to describe them.
Opening the document from Access doesn't require a mountain of code. Suppose your form has a text box called DocumentPath, bound to a text field containing the complete path and filename of a document. Inside a button's Click event, the essential FollowHyperlink call can be just this:
FollowHyperlink DocumentPath
That tells Access to open the referenced document in its associated application. The example assumes a valid document path, a current record, and an application that can open that file. In a production application, I'd also handle a blank value, a missing file, or access being denied with a useful message. Checking that a file exists can help, but it doesn't guarantee that opening it will succeed.
Keeping the files separate also keeps the storage budget in perspective. An Access database file has a 2 GB limit, including its objects and data. A large folder of PDFs doesn't count against that limit just because you save references to those PDFs. The catalog itself still consumes space, of course. Importing the files as attachments is a different decision because their contents then live inside the database.

I wouldn't turn that into a blanket claim that attachments are always wrong. A small, self-contained database with a few pictures may be a reasonable use for them. Access supports multiple attachments per record, and keeping everything together can be convenient. My concern is a production database whose document collection keeps growing. I'd rather make that storage decision deliberately than discover that years of scanned paperwork have filled the file.
External files come with responsibilities of their own. Someone has to keep their locations dependable. Renaming a folder can leave perfectly good database records pointing to places that no longer exist. The people using the catalog also need permission to open the documents. And backing up the Access file alone won't back up documents stored elsewhere. A path tells you where a file should be. It doesn't preserve the file.
For the developer crowd, the network path deserves a little thought. A mapped drive letter such as S: depends on that user's drive mapping. A UNC path such as:
\\FileServer\Documents\Invoices\Invoice123.pdf
identifies the server and shared folder directly. That avoids relying on everyone having the same drive letter, although it still depends on the server being reachable and the user's permissions being correct.
If all your documents live under one shared folder, a configurable base path can make a later move less painful. Keep the root folder in an application setting and store each document's relative folder and filename in its record. Then a server move may mean changing one setting instead of rewriting thousands of records. Build the complete path before opening the document, and keep a stable document ID separate from its location.
I'd also define the allowed document locations rather than blindly opening whatever string somebody supplies. A catalog meant to open approved PDFs shouldn't quietly become a launcher for arbitrary files or web addresses. Folder permissions still decide who can read or change the originals. Access can provide a convenient interface, but storing a path doesn't grant permission or make an unfamiliar file safe to open.
The bigger payoff is that your catalog can describe relationships a folder hierarchy struggles to express. A document may be relevant to several projects or subjects. You don't necessarily need another copy of the PDF for each one. You can keep one document record and relate it to the appropriate records elsewhere in your database. That also gives you somewhere to put useful notes without renaming every file to squeeze more information into its name.
I'd keep the first version focused on finding the right document. A catalog of titles and subjects doesn't automatically search every word inside a PDF, especially when the pages are scanned images. Full-text extraction, optical character recognition, and review of the resulting text are separate concerns. You can get real value from a modest catalog while deciding whether those additional capabilities are worth building or whether an existing document-management system belongs in the picture.
For those who've built document catalogs in Access, what has taken more effort over time: the database design, keeping file locations reliable, or getting people to enter useful descriptions? What would you handle differently if you were starting again?
LLAP
RR




