Results 1 to 6 of 6
  1. #1
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to Query For Records With Apostrophe? (a2k (9.0.6926) SP-3 Jet 4.0 SP-8)

    I

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: How to Query For Records With Apostrophe? (a2k (9.0.6926) SP-3 Jet 4.0

    Try
    <code>
    WHERE tbl_Dlicense.strLastName Like "*'*";
    </code>
    Since you are looking for an apostrophe anywhere in the name, there should be an asterisk on either side of it.

  3. #3
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to Query For Records With Apostrophe? (a2k (9.0.6926) SP-3 Jet 4.0

    Thank you

  4. #4
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to Query For Records With Apostrophe? (a2k (9.0.6926) SP-3 Jet 4.0

    The following works, is there way I change it to lookup O'Neil, O'Brien, etc?

    strIDSQL = strIDSQL & _
    " FROM " & strTable & _
    " WHERE " & cboLookupSequence & _
    " LIKE '" & Me.strTranDesc & "*' " & _
    " ORDER BY " & strSort

    Thanks, John

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: How to Query For Records With Apostrophe? (a2k (9.0.6926) SP-3 Jet 4.0

    Try
    <code>" LIKE """ & Me.strTranDesc & "*"" "
    </code>
    (the single quotes have been replaced with double double quotes)

  6. #6
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to Query For Records With Apostrophe? (a2k (9.0.6926) SP-3 Jet 4.0

    after further review you helped me in the past on same issue with this

    " LIKE " & Chr(34) & Me.strTranDesc & "*" & Chr(34) & _

    Thanks, John

Posting Permissions

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