Opening a file from a cd

Chimp8471

Registered User.
Local time
Today, 02:16
Joined
Mar 18, 2003
Messages
353
I have a database and user guide that i want to burn to a cd and can then be used on various computers.

but the problem i have is that the user guide is refered to by the click of a button, which then opens up the guide, it is refered to by it's path using the followhyperlink function.

the trouble is that i need to store the guide on the cd, but not everyone's cd drive is refered to as d:\ is there a know solution to this please.

I appreciate that the database will not be able to be updated because of the writting to cd to update problem, but this is purely for demonstration purposes.

cheers

Andy
 
If both db and user guide are in the cd, you can use CurrentProject.Path (Access 2000 or higher) or use the function below if you use Access 97 to get the relative path.

Code:
Function fRelativePath() As String
Dim strCurName As String
strCurName = CurrentDb.Name
fRelativePath = Left(strCurName, Len(strCurName) - Len(Dir(strCurName)))
End Function

If the user guide is in the same folder of the db, try something like this.

FollowHyperlink fRelativePath & "userguide.doc"

Hope this helps.
 
will give this a go later, many thanks for your help
 

Users who are viewing this thread

Back
Top Bottom