#1
  1. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Jul 2010
    Posts
    12
    Rep Power
    0

    Red face Hyperlink finds folder but cant open file


    Hi,
    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.

    Regards,
    Robert
  2. #2
  3. Moderator
    ASP Super Genius (4500 - 4999 posts)

    Join Date
    Apr 2009
    Location
    The Great Land
    Posts
    4,621
    Rep Power
    650
    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.
    I like to know if my suggestion helped you. One way to let me know is by clicking star at bottom left corner of post.
    Debug!Debug!Debug!http://www.cpearson.com/excel/debug.htm
  4. #3
  5. Contributing User
    ASP High Scholar (3500 - 3999 posts)

    Join Date
    Jan 2007
    Location
    Northern California
    Posts
    3,536
    Rep Power
    763
    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.
  6. #4
  7. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Jul 2010
    Posts
    12
    Rep Power
    0

    Red face Hyperlink


    Hello,
    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
    Robert
  8. #5
  9. Moderator
    ASP Super Genius (4500 - 4999 posts)

    Join Date
    Apr 2009
    Location
    The Great Land
    Posts
    4,621
    Rep Power
    650
    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.
  10. #6
  11. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Jul 2010
    Posts
    12
    Rep Power
    0

    Red face


    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.
    Regards,
    Robert
  12. #7
  13. Moderator
    ASP Super Genius (4500 - 4999 posts)

    Join Date
    Apr 2009
    Location
    The Great Land
    Posts
    4,621
    Rep Power
    650
    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.
  14. #8
  15. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Jul 2010
    Posts
    12
    Rep Power
    0

    hyperlink


    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!

    Robert
  16. #9
  17. Moderator
    ASP Super Genius (4500 - 4999 posts)

    Join Date
    Apr 2009
    Location
    The Great Land
    Posts
    4,621
    Rep Power
    650
    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.
  18. #10
  19. Contributing User
    ASP High Scholar (3500 - 3999 posts)

    Join Date
    Jan 2007
    Location
    Northern California
    Posts
    3,536
    Rep Power
    763
    Originally Posted by June7
    The spaces and punctuation should not be a problem
    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.

    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
  20. #11
  21. Moderator
    ASP Super Genius (4500 - 4999 posts)

    Join Date
    Apr 2009
    Location
    The Great Land
    Posts
    4,621
    Rep Power
    650
    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.
  22. #12
  23. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Jul 2010
    Posts
    12
    Rep Power
    0

    Red face hyperlink


    Hi June7.
    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.

    Regards,
    Robert
  24. #13
  25. Moderator
    ASP Super Genius (4500 - 4999 posts)

    Join Date
    Apr 2009
    Location
    The Great Land
    Posts
    4,621
    Rep Power
    650
    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.

Similar Threads

  1. Open File From Text Box
    By stlyz3 in forum Microsoft Access Help
    Replies: 4
    Last Post: January 3rd, 2005, 05:57 PM
  2. asking twice when trying to open .pdf file
    By Shelly in forum .NET Development
    Replies: 0
    Last Post: December 9th, 2004, 11:47 AM
  3. File System Object - viewing the files in a folder
    By dbail in forum ASP Development
    Replies: 1
    Last Post: September 16th, 2003, 09:49 PM
  4. How to show file names and open test file in Notepad
    By davidxz in forum ASP Development
    Replies: 3
    Last Post: September 10th, 2003, 05:23 AM
  5. Web serverístatistical analysis
    By cso in forum ASP Development
    Replies: 0
    Last Post: April 19th, 2003, 11:35 AM

IMN logo majestic logo threadwatch logo seochat tools logo