Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2004
    Posts
    14

    Unanswered: Access - using control button to open a file outside the Access Database

    Hi

    I was wondering if there is a way for me use a command button to open a file that is stored externally to Access. I have managed to do this for Word and Excel, but am struggling to control the opening of images that are stored in directories (to help control the size of the database).,

    I have a field called 'location of files' (which is the directory that the images are stored in) and a field called 'Filename' (which has the filename and extensions (e.g. case1.jpg).

    I would like my command button to concatenate the two fields (E.g. [location of files] & [filename]) and to open it in the users default software that is associated to the file type (such as photoshop).

    Any ideas on how best to achieve this?

    Thanks
    Mark

  2. #2
    Join Date
    Oct 2005
    Posts
    178
    Quote Originally Posted by marksabin
    Hi

    I was wondering if there is a way for me use a command button to open a file that is stored externally to Access. I have managed to do this for Word and Excel, but am struggling to control the opening of images that are stored in directories (to help control the size of the database).,

    I have a field called 'location of files' (which is the directory that the images are stored in) and a field called 'Filename' (which has the filename and extensions (e.g. case1.jpg).

    I would like my command button to concatenate the two fields (E.g. [location of files] & [filename]) and to open it in the users default software that is associated to the file type (such as photoshop).

    Any ideas on how best to achieve this?

    Thanks
    Mark
    Did you try Insert-Hyperlink in Form design mode? Not sure if that's all you needed.

  3. #3
    Join Date
    Aug 2004
    Posts
    14

    Talking

    Thanks for the hint Fred. Solution:-

    Private Sub Command197_Click()

    If IsNull([filename]) Then Exit Sub

    FollowHyperlink ([location of files] & [Filename])
    End Sub
    Last edited by marksabin; 01-24-06 at 06:35.

  4. #4
    Join Date
    Feb 2006
    Posts
    5
    Uff, an old post one :P
    Did you gain your aim?
    Last edited by DakDarie; 02-14-06 at 08:22.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •