sql dcount criteria syntax missing operator 
Author Message
 sql dcount criteria syntax missing operator

Try this and see if it helps:

strSQL = "UPDATE [RegionByDay] SET [Count Of Central
Lines] = DCOUNT(""[Oracle PO ID Reference2]"", ""[Day" & rst!
[Day] & "]"",""[Region Name]='Central'"") WHERE [RegionByDay].
[Day] = " & rst![Day] & ";"

--
Hoping that this is helpful...
       Ken Snell
<MS ACCESS MVP>


Quote:
> Hi,

> The sql below does not execute due to syntax error
> (missing operator) in the DCOUNT (criteria) part. What is
> the syntax error here? Cannot pinpoint it.
> Have tried several quotation, apostrophe arrangements
> on "Central"

>   With rst
>     While Not .EOF
>       strSQL = "UPDATE [RegionByDay] SET [Count Of Central
> Lines] = DCOUNT('[Oracle PO ID Reference2]', '[Day" & rst!
> [Day] & "]','[Region Name]='Central'') WHERE [RegionByDay].
> [Day] = " & rst![Day] & ";"
>       db.Execute strSQL, dbFailOnError
>       .MoveNext
>     Wend

> Thanks,

> Hank



Wed, 18 May 2005 02:37:19 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. syntax error (missing operator) in expression.

2. syntax error missing operator in query expression

3. syntax error missing operator in query

4. Question about SQL criteria syntax (+)

5. SQL statment , Missing operator

6. Dcount function - need help with the criteria part!

7. Dsum and Dcount syntax

8. Dcount VBA syntax problem

9. Syntax for DCount

10. AND operator in Filter Criteria

11. AND operator in Filter Criteria

12. DCOUNT divided by DCOUNT

 

 
Powered by phpBB® Forum Software