Results 1 to 3 of 3
  1. #1
    justphilip2003 is offline Competent Performer
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2013
    Location
    Ohio
    Posts
    125

    String text manipulation

    I have a table field JPEG_Id that contains a base picture file names like "CrNr181v1". The v1 refers to view one (front, back, left profile, etc.). I would appreciate knowing the code to nibbling off the last digit of the string and replacing it with a 2, 3 etc. I will have a Gallery form that will fetch and display the jpeg pictures. Also not all base file names will have more than one view, so I also need to intercept a file not found logic. Is the latter possible? TIA Phil

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,624
    Try:
    Left("CrNr181v1", Len("CrNr181v1")-1) & 2

    If Dir("drive:\path\filename") = "" Then
    MsgBox "File not found"
    End If
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    justphilip2003 is offline Competent Performer
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2013
    Location
    Ohio
    Posts
    125
    Wow! Thank you!

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

Similar Threads

  1. Replies: 3
    Last Post: 12-22-2012, 05:33 PM
  2. Replies: 3
    Last Post: 04-23-2012, 12:06 AM
  3. Text String.
    By cap.zadi in forum Queries
    Replies: 3
    Last Post: 11-08-2011, 09:30 AM
  4. text string
    By cbrsix in forum Reports
    Replies: 4
    Last Post: 10-27-2011, 02:24 PM
  5. Text string formatting
    By DanW in forum Forms
    Replies: 2
    Last Post: 11-02-2009, 11:11 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