Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Sep 2002
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Concatinate Quotes (XP)

    I would like to concatinate double quotes onto the ends of a description field, I am using an update query to concatinate all other characters or text, but I cannot figure out how to do quotes. Access does not like, " " " & [field1] & " " ", and I can see why, but how to fix?

  2. #2
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    1,862
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Concatinate Quotes (XP)

    I can't remember if this works in a Query, but you can use the Character Code for quotes in the coding environment. Try it in the Query to see if it works. A double quote is Chr(34). So your string would be: Chr(34) & [field1] & Chr(34)

    You can also use two doube-quotes instead of the Chr(34) in many cases: "" & [field1] & ""

    Hope this helps

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Edmonton, Alberta, Canada
    Posts
    326
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Concatinate Quotes (XP)

    To get a single double quote as a string, use four double quotes """". The outer two delimit the string, the inner two become the double-quote character (as opposed to the string delimiter).

  4. #4
    New Lounger
    Join Date
    Sep 2002
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Concatinate Quotes (XP)

    Sorry for the lag in response, this worked great! Thanks!

Posting Permissions

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