
Dcount VBA syntax problem
Hi,
This works alone as one count:
strSQLCalc = "UPDATE [RegionByDay] SET [RegionByDay].
[Percentage Central Economy Orders] = DCOUNT(""[Oracle
PO ID Reference2]"", ""[DDay" & rst![Day] & "]"",""[CDC
Region Name]='Central' AND [Carrier Cd]= 'AA2'"") WHERE
[RegionByDay].[Day] = " & rst![Day] & ";"
db.Execute strSQLCalc, dbFailOnError
Want to be able to divide the count above by the Total to
get a percentage. Inserting this count of total function
does not work as expected within the string:
/DCOUNT('[Oracle PO ID Reference2]', '[DDay" & rst![Day]
& "]')
Thanks,
Hank