You already have a post out there for that: http://www.mrexcel.com/forum/showthread.php?t=571142Now it does not error...however I like to add multiple conditions to sum 5 conditions actually....how can i do tha like sumifs in Excel.
select
sum( Expense_Amount )
from
AllExpDatas
where
(
STD_ID = mycritiria1
and
MyYear = mycritiria2
and
Qv = mycritiria3
and
Sites = mycritiria4
and
StatusV = 'Approved'
)
Rich (BB code):
Rich (BB code):select sum( Expense_Amount ) from AllExpDatas where ( STD_ID = mycritiria1 and MyYear = mycritiria2 and Qv = mycritiria3 and Sites = mycritiria4 and StatusV = 'Approved' )
STD_ID = mycritiria1
and
MyYear = #12/25/2011#
and
Qv = 'mycritiria3'
and
Sites = 'mycritiria4'
and
StatusV = 'Approved'