Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Aug 2002
    Location
    New Jersey, USA
    Posts
    180
    Thanks
    0
    Thanked 0 Times in 0 Posts

    syntax error (97 2)

    I know I am missing a " or a , but it is driving me crazy.

    RecCt = DCount("[date_processed]", "Tbl:Processed_Date_Log", "[Date_Processed] = " & Chr(34) & RptDate & Chr(34) and "[file_processed] = " chr(34) & dailyfilename & chr(34)

    thanks again, you guys are the best!!!!

  2. #2
    Star Lounger
    Join Date
    Jul 2006
    Location
    Colorado, USA
    Posts
    55
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: syntax error (97 2)

    One possibility would be that if the RptDate is Date/Time format, it should be surrounded by #'s instead of by "'s

  3. #3
    2 Star Lounger
    Join Date
    Aug 2002
    Location
    New Jersey, USA
    Posts
    180
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: syntax error (97 2)

    That is not it because it worked until I added the second criteria. I think I am doing something wrong there, I just can't figure out what.

  4. #4
    2 Star Lounger
    Join Date
    Mar 2004
    Location
    Cincinnati, Ohio, USA
    Posts
    102
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: syntax error (97 2)

    Try this:

    RecCt = DCount("[date_processed]", "Tbl:Processed_Date_Log", "[Date_Processed] = " & Chr(34) & RptDate & Chr(34) & " and [file_processed] = " & chr(34) & dailyfilename & chr(34))

    A few ampersands were missing, and a quotation was late to the party.

Posting Permissions

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