Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inserted Object Pathnames - Don't Work When I Move DB

Status
Not open for further replies.

mjc2002

Technical User
Jul 16, 2002
20
ES
I have an Access DB including links to several objects - eg. pictures and soundfiles. The DB works fine until I move it or copy it because all the linked pathnames are no longer valid. I've tried inserting relative filenames (eg. "pic1.jpg" instead of "D:\Mike\MyDocs\MyDB\Pics\pic1.jpg"), but I can never get the command line right - I always get a message telling me that "pic1.jpg" is not a valid filename... so I try working back to "\pic1.jpg", "Pics\pic1.jpg", "\Pics\pics1.jpg", etc. but always with the same message, eventually forcing me to insert the absolute path... which is fine, as I say, until I move the DB, make a copy for a friend or whatever.

Any ideas gratefully received

Cheers
Mike
 
You could create a small table to hold a few things relevant to new pcs, such as data path and / or say, photo path. You can then use this table with DLookUp to add the first bit of the path to your photos and sounds. If your photos/sounds live in a subfolder of your database folder, you can use CurrentProject.Path to get the first part of the path. However, all this assumes that photos etc will always be found in a particular folder on every new PC, so you may prefer to create a path field. This can be updated on install, so that existing files are found, but new files can be added using a browse button.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top