Oops - almost missed one - you also need to change 'ValueOfStake' to
just
'Stake'.
--
Brendan Reynolds (MVP)
Is that a space in the table name (between 'tbl' and 'accountMon')? If
so,
you'll need square brackets around the table name. You also need to
lose
the outer-most parentheses (the one before 'SELECT' and the one after
the
';'). Try this ...
SELECT [tbl accountMon].account, [tbl accountMon].ection, Sum([tbl
accountMon].ValueOfstake) AS
SumOfValueOfstake, Avg([tbl accountMon].ValueOfstake) AS
AvgOfValueOfstake
FROM [tbl accountMon]
GROUP BY [tbl accountMon].account, [tbl accountMon].ection;
--
Brendan Reynolds (MVP)
Hi Brendan,
I named the tables and fields correctly to:
(SELECT tbl accountMon.account, tbl accountMon.ection, Sum(tbl
accountMon.ValueOfstake) AS
SumOfValueOfstake, Avg(tbl accountMon.ValueOfstake) AS
AvgOfValueOfstake
FROM tbl accountMon
GROUP BY tbl accountMon.account, tbl accountMon.ection
But keep getting a syntax error, I tried numerous bracket groupings
but
just
can't get it to work. For your reference the following might help:
tblTest = tbl accountMon
MemberName = account
HorseName = ection
Bet = stake
Thanks for your time and effort, its very good of you to care.
Regards
Tailwag
:
This would give the total and average bet per member per horse.
Change
the
table and field names to your actual names, obviously ...
SELECT tblTest.MemberName, tblTest.HorseName, Sum(tblTest.ValueOfBet)
AS
SumOfValueOfBet, Avg(tblTest.ValueOfBet) AS AvgOfValueOfBet
FROM tblTest
GROUP BY tblTest.MemberName, tblTest.HorseName;
--
Brendan Reynolds (MVP)
In palin English, I have a table based on club members and several
other
fields of numeric data. Some of the fields are numbers, some
currency
and
some text. This data deals with members betting on horse races.
My question is how to display a summary of each members bets based
on
horse
names, as opposed to the entire recordset showing all transactions?
It
is
possible that a member can have more than one bet on the same horse
on
the
same day.
Thanks.