Results 1 to 3 of 3
  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

    Looking For Proper Query Syntax? (a2k (9.0.6926) SP-3 Jet 4.0 SP-7)

    I have the following where clause in form that works OK:

    strSQL = strSQL & "WHERE tbl_RevGLDesc.strFundCode1 = '" & "C" & "'"
    strSQL = strSQL & " OR tbl_RevGLDesc.strFundCode1 = '" & "P" & "'"

    I

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

    Re: Looking For Proper Query Syntax? (a2k (9.0.6926) SP-3 Jet 4.0 SP-7)

    John, if you replace the double quotes by single quotes in the WHERE condition you copied from SQL view (and put double quotes before and after it), it should work. Broken up into three lines:<pre>strSQL = strSQL & " WHERE (((tbl_RevGLDesc.strRevCode)='101') AND " & _
    "((tbl_RevGLDesc.strFundCode1) In ('C','P'))) OR " & _
    "(((tbl_RevGLDesc.strRevCode) Between '201' And '899'))"</pre>


  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: Looking For Proper Query Syntax? (a2k (9.0.6926) SP-3 Jet 4.0 SP-7)

    You make it look easy

    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
  •