Page 2 of 2 FirstFirst 12
Results 16 to 17 of 17
  1. #16
    DMT Dave is offline VIP
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    1,195

    Hi Guy's this has done the trick, only done the first 2 so will do the other 4 later but just thought i would show the result after tidying it.

    PS: thank you all again for your input, I like Colin's idea to populate a list, just don't have the form space so this works a treat

    Code:
    Dim str1() As String, str2() As String, str3() As String, str4() As String, str5() As String, str6() As StringDim strMailMessage As String, img1 As String, img2 As String
    Dim intA As Integer, intB As Integer
    
    
    strMailMessage = Me.txtMailMessage
    
    
    str1 = Split(strMailMessage, vbCrLf)
    For intA = 0 To UBound(str1)
        If InStr(1, str1(intA), "Photo Upload 1: Open File <") > 0 Then
        imgA = Replace(Mid(str1(intA), 28), ">", "")
        Me.txtImageA = imgA
        Me.cmdImgA.Visible = True
    End If
    Next intA
    
    
    str2 = Split(strMailMessage, vbCrLf)
    For intB = 0 To UBound(str2)
        If InStr(1, str2(intB), "Photo Upload 2: Open File <") > 0 Then
        imgB = Replace(Mid(str2(intB), 28), ">", "")
        Me.txtImageB = imgB
        Me.cmdImgB.Visible = True
        End If
    Next intB

  2. #17
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,654
    Code:
    "Photo Upload 1: Open File " https etc
    "Photo Upload 2: Open File " https etc
    "Photo Upload 3
    "Photo Upload 4
    "Photo Upload 5
    "Photo Upload 6
    Just a thought,

    Given your initial sample data I would test for "http" in your Instr(). That would indicate that there is a URL and the others can be disregarded.
    This would allow you do to the parsing in one swoop.
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

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

Similar Threads

  1. Converting text data to Hyperlink
    By jcc285 in forum Programming
    Replies: 14
    Last Post: 05-30-2019, 11:42 AM
  2. Replies: 1
    Last Post: 11-21-2018, 05:02 PM
  3. Converting Hyperlink field back to short text
    By gksmith5 in forum Access
    Replies: 3
    Last Post: 06-02-2018, 01:19 AM
  4. Linking a hyperlink (texbox) to a Photo
    By johnnyBQue in forum Access
    Replies: 5
    Last Post: 12-02-2014, 07:58 AM
  5. Export to excel with hyperlink converting
    By Jamy in forum Import/Export Data
    Replies: 0
    Last Post: 03-22-2010, 08:36 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