Results 1 to 6 of 6
  1. #1
    WAVP375 is offline Competent Performer
    Windows 8 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Dayton Ohio
    Posts
    171

    Remove first and last " from an image path string

    When copying an image path it always has the " front and back indicating it is a string.


    I am pasteing it in a text box on a data entry form. How can I programmatically eliminate them both and still have the resultant string in the same text box for saving to the table.

    Thanks for any help

  2. #2
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,388
    This should do it:

    Code:
    Private Sub MyTextbox_AfterUpdate()
        MyTextbox = Replace(MyTextbox, Chr$(34), "")
    End Sub

  3. #3
    WAVP375 is offline Competent Performer
    Windows 8 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Dayton Ohio
    Posts
    171
    I don't understand the Chr$(34) but it works beautifully.

    Thanks

  4. #4
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,388
    Chr$(34) is the ascii for double quotes.

  5. #5
    WAVP375 is offline Competent Performer
    Windows 8 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Dayton Ohio
    Posts
    171
    Thanks again. This works well but it leaves a space in the front of the path string, which isn't good for the path. Is there a way to not produce the space?

  6. #6
    WAVP375 is offline Competent Performer
    Windows 8 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Dayton Ohio
    Posts
    171
    Sorry to bother. I found it. LTrim works fine
    Thanks for the help

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

Similar Threads

  1. Copying the path and file name of an image
    By WAVP375 in forum Access
    Replies: 4
    Last Post: 07-27-2016, 08:52 AM
  2. Replies: 4
    Last Post: 05-26-2016, 05:57 AM
  3. Replies: 4
    Last Post: 07-12-2014, 02:02 PM
  4. Replies: 10
    Last Post: 01-09-2014, 03:00 AM
  5. Replies: 1
    Last Post: 05-14-2013, 11:49 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