PDA

View Full Version : Open File



skisy
07-23-2008, 07:15 AM
Hi there,

I'm trying to work out what I need to do to be able to open a file using VBA in Access. I want to open a video file in PowerDVD from the database.

My specific problem is I have a database of films, each record(film) has a "Link" field in this "Link" field is the directory path to the file. At the moment I am able to take the value of the link field from each record and on the click of a command button I can open the directory it is found in using "ShellExecute....." But I want to be able to just load the video straight from Access.

Any help would be much appreciated, code would be even better!

Thanks

CreganTur
07-23-2008, 01:29 PM
I'm not sure if this will work for video files, but you can try the Follow Hyperlink method:

Application.FollowHyperlink Filepath, , True

Filepath is a variable, the value of which is the full filepath to your file (be sure to include the file extension at the end).


But I want to be able to just load the video straight from Access.

If by this you mean that you want to have the PowerDVD application already up and load the video to the open application, then I'm not sure if this is possible unless there is an object library reference available for PowerDVD.