Dcount VBA syntax problem 
Author Message
 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



Sun, 22 May 2005 23:36:36 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Dsum and Dcount syntax

2. sql dcount criteria syntax missing operator

3. Syntax for DCount

4. DCOUNT divided by DCOUNT

5. Help with DCOUNT overflow problem

6. DCount problem

7. DCount - Problems

8. DCount and Date Problem

9. Problems with DCount function

10. syntax to reference to subform in vba code????

11. refernce subform syntax in VBA

12. SQL in VBA syntax question

 

 
Powered by phpBB® Forum Software