Adding code to existing Code

H

Heather

I need to add to my existing statement. I want it to still
be able to calculate the way it is doing now, but I also
need it to do another calculation. I need to add a field
call Type from the qry_iw_detail, now I need in a separate
field say Called NEWFIELD if the Type is = "Hypo" then Sum
(Act) where mnth is = 1.

I put my Original Code the results need to be in
tbl_call_rpt_iw.

sql = "INSERT INTO tbl_call_rpt_iw ( SCHFOR, C_NAME, jan,
THyp ) " & _

"SELECT inside_name,C_NAME, Sum(act) AS SumOfvisits FROM
qry_iw_detail WHERE mnth = 1 GROUP BY inside_name, C_NAME"


THANKS!!!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top