Results 1 to 2 of 2
  1. #1
    2 Star Lounger
    Join Date
    Feb 2003
    Thanked 0 Times in 0 Posts

    Query error (2002/sp2)

    I'm having a query syntax error. I know what the problem is but I'm not sure of the fix.
    I have this in a query field:

    class2-2: IIf([enrclass2]=2,"It's a Bug's World")

    I get a syntax error message. The problem is the two ' and ' in the It's a Bug's Life

    If I change things to remove the two ' and '

    class2-2: IIf([enrclass2]=2,"Its a Bugs World")

    Things work correctly.

    I want the ' in there. How do I code it.

    Thanks Paul

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 31 Times in 31 Posts

    Re: Query error (2002/sp2)

    Using single quotes in a string shouldn't be a problem. If I paste your expression in a query of mine, and replace enrclass2 with the name of a field in my query, it works OK. So I suspect something else is wrong - check carefully that the expression in your database is the same as the one you posted.

Posting Permissions

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