Page 2 of 2 FirstFirst 12
Results 16 to 18 of 18
  1. #16
    DDS is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Apr 2018
    Posts
    24
    So the code would look something like this:


    Code:
    Sub AssignStillImage()
    
    
        Dim imgPath As String
        Dim imgFile As String
        Dim finalImagePath As String
        
        imgPath = "C:\Users\Jon\Google Drive\OrionDDS\Artwork\3D\Still\"
        imgFile = imgPath & Me.DesignNumber
        
        If Len(Dir(imgFile & ".*")) > 0 Then  'Checks if the basic design number without any name variation exists
            finalImagePath = Dir(Me.StillFile & ".*") ' If so assigns this file to the finalImagePath string value
        Else
            '....finalImagePath = the first instance of a file with a name that starts with Me.DesignNumber but is not a revision of Me.DesignNumber.... This is where I need help
        End If
        
        Me.StillImage.Picture = finalImagePath
        
    End Sub

  2. #17
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    You haven't said whether my solution works for you or not but my work commitments means I will have to drop out now. Hopefully someone else will pick it up

    Good luck with your project

  3. #18
    DDS is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Apr 2018
    Posts
    24
    Thanks for your help Ajax

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 07-07-2016, 12:22 PM
  2. Replies: 1
    Last Post: 09-07-2015, 08:00 AM
  3. Replies: 2
    Last Post: 01-18-2014, 08:42 PM
  4. Replies: 6
    Last Post: 06-07-2013, 09:45 AM
  5. Replies: 1
    Last Post: 10-08-2012, 09:01 AM

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