
Updating a single OLE link for a record OR updating existing database
Hi
Using
Q311147 ACC2000: How to Programmatically Change the Paths to Linked
OLE Objects
and
Q198466 ACC2000: How to Load OLE Objects from a Folder into a Table
I have learned a fair number of things but can't make the jump to my
particular problem solution.
My objective is:
While viewing a single record on a form
which has a field defined as an OLE Object field whose purpose is to
display a photo
I wish to have a button that does almost the same functionality
as
Right Clicking on the field, Selecting Insert Object,
Create from File, Checking Link and then browsing to the folder to find the
file.
In my case, I know the folder. I know the name of the photo if it
exists (created from other fields in the record)
From the two KB articles above, What I do have working is a function to
determine if the file exists
The Q311147 article sets the object to be the form. For my problem, I
need the equivalent of what the article does for the form but applied to a
particular field on the form instead.
.
The above would allow the user to link the photo on a record by record
basis. This will be most useful for new records that are added.
An alternate approach would be to Modify Q198466 to update existing
records. Its designed to create an entire new table. It would seem I need
to combine this with the other KB article as it says you have to delete
existing before you can create the new link.
This would eliminate the need for the button requested above as the
function could be run periodically to update all the records.
I would like to know how to do both though.
Your help (and especially code) would be greatly appreciated.
Mark