View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Duke Carey Duke Carey is offline
external usenet poster
 
Posts: 1,081
Default How can I modify the SELECT statement?

One way:

MyQuery = _
"SELECT SUM(JOBACTIV.POVALUE) as sum " & _
"FROM JOBACTIV WHERE JOBACTIV.JOBCLASS = 'S' " & _
"AND StartDate = #" & range("A1") & "# and StartDate <= #" & _
range("A2")&"#;"


"wliong" wrote:


It works.. Thanks.
I'm just wondering, is there any way that I could specify any date on
the start date? For example, the range of the start date is put it in
cell A1 and A2, and the query read that cell as the range for the date.

Is there any way to do that?

Thanks.


--
wliong
------------------------------------------------------------------------
wliong's Profile: http://www.excelforum.com/member.php...o&userid=28343
View this thread: http://www.excelforum.com/showthread...hreadid=519883