To me, your post implies that you want the record to contain a file reference (that would be its file path). That means a table field that contains file path as part of the record. If there could be several files related to the record, you should have a table for attachment records. Best method IMO is to use a file dialog (e.g. msoFileDialogFilePicker) that you open from your form, choose the file from Windows File Explorer (that is basically what you end up opening) and store the path in the record. While you can store files in an attachment field in Access, you would be wise to not do so due to db bloat.
reference number (primary key). The reference number could be the actual file name of the PDF
No. PK fields should never be meaningful data. Might be a good idea for you to review for that pointAbout Auto Numbers
- http://access.mvps.org/access/general/gen0025.htm
If you search, you will find many pages on how to use the file dialogs.
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.