Syntax error (Missing Operator) in query expression

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • OzNet
    New Member
    • Aug 2007
    • 31

    Syntax error (Missing Operator) in query expression

    I am getting this error:
    Syntax error (Missing Operator) in query expression '[Project] =ZYZ Project'

    My code is:
    intProjectEstim ate = DSum("LumpSum", "tblProjEstimat eLumpSum", "[Project] =" & Me.cboProject & "")

    I have tried various combinations of double and single quotes without success.

    Can anyone shed some light please?

    Many thanks
  • missinglinq
    Recognized Expert Specialist
    • Nov 2006
    • 3533

    #2
    Assuming that Project is text, I believe you'll find that

    "[Project] =" & Me.cboProject & "")

    needs to be

    "[Project] ='" & Me.cboProject & "'")


    Linq ;0)>

    Comment

    • OzNet
      New Member
      • Aug 2007
      • 31

      #3
      Thanks Linq ;0)>

      That did the trick!

      Actually, I thought I had tried that at some stage but it did not work before. Obviously, I mistyped something!

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32662

        #4
        Originally posted by OzNet
        I am getting this error:
        Syntax error (Missing Operator) in query expression '[Project] =ZYZ Project'
        Quoting the error message like that made the answer a doddle (especially for one of Linq's calibre). I just wanted to draw attention to how much easier you made this than many do :)

        Comment

        Working...