select
count(*) as this_is_the_number_of_rows
from
my_table
where
(
field_CC ='1002'
)
select
sum(field_1) as this_is_field_1_from_every_row_added_together
from
my_table
where
(
field_CC ='1002'
)
[/FONT]
[FONT=Courier New]SELECT Sum(Exps) AS Expr1
FROM Table1
WHERE (((Table1.[CC_N])="1009"));
[/FONT]
[FONT=Courier New]Dim LTotal As Currency
'LTotal = DSum("Exps", "Table1", "CC_N = 1009")
LTotal = DSum("Exps", "Table1", "CC_N = 1009", "Q1234 = QQ102")
sum or count ?
Rich (BB code):Rich (BB code):select count(*) as this_is_the_number_of_rows from my_table where ( field_CC ='1002' )
Rich (BB code):Rich (BB code):select sum(field_1) as this_is_field_1_from_every_row_added_together from my_table where ( field_CC ='1002' )
SELECT Sum(Exps) AS Expr1
FROM Table1
WHERE (((Table1.[CC_N])='1009'));
LTotal = DSum("Exps", "Table1", "CC_N = 1009", "Q1234 = QQ102")