Results 1 to 10 of 10
  1. #1
    Join Date
    Jul 2010
    Location
    Fire Island Pines, NY
    Posts
    513

    scrolling through hyperlinked images

    i have a form with an image displayed
    on dblclick, the image opens in the users' photo app (typically MS Photos, or whichever is MS$ft's current default...)

    i am told that once opened, you used to be able to scroll through other images in that folder (I had not realized this; and indeed, it would be very useful);
    but now you cannot

    I can scroll if I open the same image file (*.jpg) in the folder directly

    But if through access I open that same *.jpg, in that same folder, with the same software… I cannot


    (the link to the image is stored as a hyperlink in its table; the image is always a *.jpg.)

    _________________________________________
    any thoughts will be greatly appreciated in advance,
    mark

  2. #2
    Gicu's Avatar
    Gicu is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,250
    Please show us the code you use to open the image, just application.followhyperlink or something else. You should try to set the field as Short Text and store the (full) path to the file instead of setting it as hyperlink.

    As an alternative you can use Shell to open the image in its native app and see what you get.
    https://docs.microsoft.com/en-us/off...shell-function

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  3. #3
    Join Date
    Jul 2010
    Location
    Fire Island Pines, NY
    Posts
    513
    Code:
    Private Sub imgCutSheet_DblClick(Cancel As Integer)
        Dim vCutSheetLink As String
        If Len(Me.txtCatalogSheetLink.Value) > 0 Then
            vCutSheetLink = Me.txtCatalogSheetLink.Value
            If InStr(vCutSheetLink, "#") > 0 Then
                strLink = Split(vCutSheetLink, "#")(1)
            Else
                strLink = vCutSheetLink
            End If
            Application.FollowHyperlink strLink
        End If
    End Sub
    a typical file link would be:
    G:\JOBS\NYU Coles (2016-6032)\Specifications, Schedules and Cuts\Schedules and Cuts\Cuts\TB_EPL_0_017_THREE_XTM_WL_6-29-16 Page 001.jpg

    the default app (typical) seems to be MS Photos (it could vary between users)



  4. #4
    Gicu's Avatar
    Gicu is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,250
    So replace FollowHyperlink with Shell() to see if you get the desired result:
    Code:
    Private Sub imgCutSheet_DblClick(Cancel As Integer)
        Dim vCutSheetLink As String, RetVal
        If Len(Me.txtCatalogSheetLink.Value) > 0 Then
            vCutSheetLink = Me.txtCatalogSheetLink.Value
            If InStr(vCutSheetLink, "#") > 0 Then
                strLink = Split(vCutSheetLink, "#")(1)
            Else
                strLink = vCutSheetLink
            End If
            'Application.FollowHyperlink strLink
    	   RetVal = Shell(strLink, 1) 
        End If
    End Sub
    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  5. #5
    Join Date
    Jul 2010
    Location
    Fire Island Pines, NY
    Posts
    513
    at
    RetVal = Shell(strlink,1)

    i get error 5:
    "invalid procedure call or argument"

    with strLink =
    G:\JOBS\NYU Coles (2016-6032)\Specifications, Schedules and Cuts\Schedules and Cuts\Cuts\TB_EPL_0_017_THREE_XTM_WL_6-29-16 Page 001.jpg
    (as a string)

  6. #6
    Gicu's Avatar
    Gicu is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,250
    Because you have spaces in your path you should wrap it in double-quotes:
    Code:
    RetVal = Shell(chr(34) & strlink & chr(34),1)
    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  7. #7
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,205
    you used to be able to scroll through other images in that folder (I had not realized this; and indeed, it would be very useful)
    In case it helps, have a look at my Folder Image Viewer app
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

  8. #8
    Join Date
    Jul 2010
    Location
    Fire Island Pines, NY
    Posts
    513
    (thnx, makes complete sense, but... still getting the same error)

  9. #9
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 11 Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,880
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

  10. #10
    Join Date
    Jul 2010
    Location
    Fire Island Pines, NY
    Posts
    513
    thnx
    tried it (minor update to 64bit)
    and it worked just fine, but still with the same issue: cannot scroll through the images when opened in this manner (can do so when the same file, in the same directory, is opened directly in the same software)

    ...i'd say this is a head scratch-er !

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 02-11-2016, 11:22 AM
  2. Replies: 2
    Last Post: 07-01-2014, 07:24 AM
  3. Replies: 2
    Last Post: 04-22-2014, 02:48 PM
  4. Replies: 1
    Last Post: 03-22-2014, 04:10 PM
  5. Replies: 6
    Last Post: 12-06-2013, 11:00 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums