Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How can I execute this query?
Hi all, I'm trying to do a query from MS Access to MS excel which have th condition that the date period has to be on a specific month, and want to get the sum of the value. I try to do this, but it didn't work. Code ------------------- MyQuery = "SELECT SUM(JOBACTIV.POVALUE) as sum FROM JOBACTIV WHERE JOBACTIV.JOBCLASS = 'S';" Set rs = db.OpenRecordset(MyQuery) Cells(1, 1).Value = Su ------------------- How can I fix this problem? Note: JOBCLASS is a field in the Access table Thank you very much -- wlion ----------------------------------------------------------------------- wliong's Profile: http://www.excelforum.com/member.php...fo&userid=2834 View this thread: http://www.excelforum.com/showthread.php?threadid=51986 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Could not execute | Excel Worksheet Functions | |||
Excel VBA Query Using Access Database Hangs on 2nd Execute | Excel Programming | |||
Execute a query from a macro | Excel Programming | |||
Macro to execute on WEB Query Refresh | Excel Programming | |||
Execute a query against an excel doc and a sql server db | Excel Programming |