Link PDF file to a record using vba

ielamrani

Registered User.
Local time
, 20:00
Joined
May 6, 2008
Messages
51
Hi all,
I have this database to keep track of our company's licenses. It works fine. We have about 250 records, each record contains licensee's info and also has an ole field linked to a folder that gets updated directly from the form.

All the linked files are pdf files.

Whenever we have a new license or one that needs to get updated we do (right click ----Insert Object ---etc).

The problem I am having is..

If the user is updating a license or replacing an expired one with a new one, the user needs to access the folder, move the expired License to a new folder and name the new license so it gets linked to the database.

Is there a way to do this process using vba like a button to update or replace the existing pdf file.

the linked files are under a folder like this:

R:\oper\Licenses\Folder(usualy a state name)\Filename.pdf

Thanks in advance
 
Are you actually linking to a pdf or are you embedding it? You would normally create a hyperlink to the pdf and store the path and file name to the table as a string. Then when a new license is created and is saved to the default location the link will be looking at the most recent version of the pdf.

Are you actually retaining the out of date pdf's on your server for historic purposes?
 
Yes, I am linkking directly to the PDF file and we're keeping the old licenses for historic purposes. thank you
 
Here is a demo of a way of listing all the files in a known folder and opening them in their native software.

May be not exactily what you want but you may be able to modify it to suit your needs.

David
 

Attachments

David,
Sorry I did not respond quickly I got busy at work. But I like the find file database you recommended. I think I can use it to solve my problem. Thank you so much.
 

Users who are viewing this thread

Back
Top Bottom