Maria,
The error you get when running from the cd is probably because the file is
read only on the cd. It should still work though, as long as you aren't
trying to modify data or design.
If it was running on the disk, you could use the database name to tell you
what drive is the cdrom.
The following code returns the name of the database including the path.
Currentdb.Name (ie: D:\Access.mdb)
Left(currentdb.name, 2) would return the drive letter. (ie: D
Instead of saving the drive letter in your hyperlink fields, you can just
save the relative path and use the drive letter from above.
For example: instead of saving D:\Files\Filename.jpg in the table, save
\Files\Filename.jpg
Then you can use
Application.FollowHyperlink Left(Currentdb.Name, 2) & "\Files\FileName.jpg"
Or you could find the drive letter using the FileSearch command, but then
you'd still have to use relative paths in your table.
Last option would be to put the Cd in a drive that is shared and accessible
to all users. Then save the unc path in your table. (ie:
\\Server\Share\Files\FileName.jpg)
HTH,
Josh