Results 1 to 2 of 2

Thread: Quotes in Findfirst string

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 1999
    Location
    Littlehampton, W Sussex GB
    Posts
    203

    Post

    Is it possible to find a record on an Access database when the name you are looking for contains an apostrophe? E.g. St Mary's Bakers. I am doing a search on Customer name and get a runtime error 3077 whenever there is an apostrophe.
    I am using Findfirst with the name as a string.

  2. #2
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844

    Post

    All single quotes must be replaced with 2 single quotes (NOT a double quote) before submitting it for processing:

    example: O'Brien must equal O''Brien for it to work

    You can use VB6's REPLACE function to do this for you as well

    Tom

    [This message has been edited by Clunietp (edited 01-24-2000).]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width