
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