August 12th, 2010, 11:21 PM
Hyperlink finds folder but cant open file
This helpful forum helped me fix a prior Access problem but now I have another.
I have created the trusted folders etc and have run a hyperlink to
open .wav music files. Works great. I now need to use similar hyperlinks to open avi files. I thought this would be simple but I get a message that access cannot opoen file.
I have run modified hyperlink and it finds all folders no problem but as soon as I add the file type, avi or wmv it returns "cannot open file" The files are OK as they open with double click.
Any assistance appreciated.
August 13th, 2010, 12:20 AM
I just tested a hyperlink field with avi file and no problem opening the file with click on table field.
Since can't replicate your problem, can't offer solution - Sorry.
Last edited by June7; August 13th, 2010 at 06:39 PM.
August 13th, 2010, 07:17 PM
Sounds like a problem with "file associations" in My Computer. Access cannot "open" anything but Access files, but if you have a filetype associated with another program, like Windows Media Player for .avi files, it will use that program to open the file. Open My Computer, Tools, Folder Options, File Types tab, scroll down to AVI, select that and look below for "Details". You will be able to set whatever program you want to open .avi files, by default. Usually it is set to Windows Media Player.
Experience is the thing you have left when everything else is gone.
August 13th, 2010, 07:53 PM
I have checked what you said and the default app to open file is WMP. I have loaded the AVI files into WMP and have pointed the hyperlink ate their address in WMP. I was confident this would work but something unexpected has happened. The hyperlink goes to C:\users\robert\mydocuments.
So I copied a copy of the AVI file to this location and again would have bet it worked but it opens the my document folder but not the AVI within the folder.
Weird dont you think.
Thanks again for your thoughts. Any ideas welcome
August 13th, 2010, 08:14 PM
What do you mean by 'pointed the hyperlink at their address in WMP'. The hyperlink is just a path string to the file location. Show your actual hyperlink string as it is in the table. As I said, I had no problem with opening avi file through hyperlink. All I did was copy avi file to a folder and then built the hyperlink path string. No 'loading' into WMP.
August 13th, 2010, 08:24 PM
Sorry. What I meant was I made a new hyperlink in ms access that went to the address of the avi file. In this case to the file in WMP.
I have no idea why the hyperlink goes to my documents folder when the address it should have gone to was in WMP.
I think I will have to forget about opening the avi from Access and instead go to WMP. That requires a few more key strokes but may be the only alternative. Its just that when on stage I need to bring up the song or video quickly that is why direct access via ms Access is attractive.
August 13th, 2010, 08:41 PM
I don't think hyperlinking an address to within WMP will work (apparently it isn't). Make the hyperlink the path to the Windows folder. I had no problem with this. Did not seem to be so slow.
August 13th, 2010, 09:39 PM
Thank for your patience.
In case I am making a basic error, I will type out the exact link etc.
The avi file is called phil collins - sussudio. It is located at D:\allmusic\videos.
The hyperlink in an Access cell is:
D:\allmusic\phil collins - sussudio.avi
Thats it....it should work..shouldn't it? Beats me!
August 14th, 2010, 11:17 AM
Okay, that seems to clarify and yes that looks just like what I did except on drive C. The spaces and punctuation should not be a problem (your wav file has them and works?).
My avi file is an episode of Eureka!
Mysterious! Sorry, no solution.
August 14th, 2010, 11:51 AM
Actually, I'd guess that could be the problem. The Windows operating system tolerates spaces in file names, but may cause problems when embedded in strings, etc., and certainly does in other operating systems.
Originally Posted by June7
It's very easy to determine if this is involved: either use another file that does NOT have spaces in the filename, or make a COPY of a file and give it a simpler name, and see if that works. I can't see any reason why it wouldn't.
[Added thought: You have said several times that your hyperlink is pointing to the file "in WMP"--are you saying that the file is in a folder whose name is WMP? If you are using Access2007, it's possible that the WMP folder is not a "trusted location." If that's a possible scenario, locate the files elsewhere or certify that location as a trusted location.]
Last edited by don94403; August 14th, 2010 at 11:54 AM.
Reason: Second thoughts
August 14th, 2010, 12:20 PM
I just tested the hyperlink with spaces. Space in folder name was okay but not in the avi file name. So rename the avi file and edit hyperlink.
August 14th, 2010, 05:39 PM
Funny thing...thats my birthday!
The spaces is a good point.
I simplified the name and made no spaces. Odd thing happened..I didn't get the message "cannot open file" but the link went direct to the folder C:|users\robert\my documents. You may recall it did this before in previous post so I saved a copy of the avi file there to see if hyperlink would open it but it still doesnt. It just opens the docs folder and there is the avi....waiting to be opened.
Despite me addressing the link to d drive, it goes to the C drive address.....how is that possible? This is freaky.
August 14th, 2010, 05:49 PM
EDIT: Replace comments with:
Oops! Just realized was opening with DivX not WMP. Download DivX for free. Tested with WMP as default and yes that did work too.
Use VBA to open the file. Make the field a memo datatype instead of hyperlink. Create a form to display records, Dataview probably okay. In click event for textbox put code:
Shell "C:\Program Files\Windows Media Player\wmplayer.exe D:\path to avi folder\" & Me.textboxname, vbNormalFocus
Make sure no space in path to avi file. I got this to work with both DivX and WMP. You won't get that annoying security warning.
Last edited by June7; August 14th, 2010 at 09:18 PM.