"Larry Linson" <bouncer@localhost.not> schreef in bericht
news:hzGlb.28735$Ee6.11822@nwrddc01.gnilink.net...[color=blue]
> Sounds like good advice would be a session with a good book on relational
> database design. Storing something that can be calculated when it is[/color]
needed,[color=blue]
> if that is what you are doing, is redundant, and often leads to problems
> later.
>
> But, to perform a sum on a particular field in a table in code, with or
> without applying selection criteria, you can use the DSum domain aggregate
> function. To do it in a query, create a SELECT query in the Query Builder
> design view, then click View | Totals and choose the appropriate items for
> each field, such as "Sum", "Average", "WHERE", and "GROUP BY".
>
> Larry Linson
> Microsoft Access MVP
>
> "Foxster" <erik.reynaert@skynet.be> wrote in message
> news:3f96a2ba$0$306$ba620e4c@reader1.news.skynet.b e...[color=green]
> >
> > "andybriggs" <member38555@dbforums.com> schreef in bericht
> > news:3506540.1066754627@dbforums.com...[color=darkred]
> > >
> > > Looking at your code, there are a couple of errors: it won't run as it
> > > is. It should be:
> > >
> > >
> > >
> > > dim rsartikelskl as recordset
> > >
> > > set huidigedB= currentdB
> > >
> > > set rsartikelskl=huidigedB.openrecordset("qrybegan", dbopendynaset)
> > >
> > > rsartikelskl.Movefirst
> > >
> > > Do until rsartikelskl.EOF()
> > >
> > > rsartikelskl.edit
> > >
> > > rsartikelskl!totalpoint=rsartikelskl!sumpointgame
> > >
> > > rsartikelskl.update
> > >
> > > rsartikelskl.MoveNext
> > >
> > > loop
> > >
> > > rsartikelskl.Close
> > >
> > >
> > >
> > > You should also add these lines to release the object variables and
> > > reclaim memory space:
> > >
> > >
> > >
> > > Set rsartikelskl = Nothing
> > >
> > > Set huidigedB = Nothing
> > >
> > >
> > >
> > > This may not be the cause of your problem, but it's a start. Also, are
> > > you sure that your query is an updateable recordset? Try entering data
> > > manually into your query, because, if you can't, your code won't be[/color][/color][/color]
able[color=blue][color=green][color=darkred]
> > > to either.
> > >
> > >
> > >
> > > The SQL to do the same thing would be "UPDATE QryBegan SET TotalPoint[/color][/color][/color]
=[color=blue][color=green][color=darkred]
> > > SumPointGame".
> > >
> > >
> > >
> > > Hope this helps.
> > >
> > >
> > > --
> > > Andy Briggs
> > > Elmhurst Solutions Limited
> > >
http://www.elmhurstsolutions.com
> > >
> > >
> > > Posted via
http://dbforums.com[/color]
> >
> >
> > thx for reply
> > as a matter of fact results of the the query are not updatable.....again
> > something i've leard
> >
> > but now....other solutions
> > the question is now......
> > a have a tabel and i have to make a sum of a field
> > the result of that field must be put in a field of another table
> >
> > who can give me some good advice????
> >
> > thx for reply
> >
> >
> > ---
> > Outgoing mail is certified Virus Free.
> > Checked by AVG anti-virus system (
http://www.grisoft.com).
> > Version: 6.0.516 / Virus Database: 313 - Release Date: 1/09/2003
> >
> >[/color][/color]
thx for reply
i agree what you are saying about redundant matter but i have to make a
report with the first table and sort them first according to fields in that
table and then those who are not sorted by the fields in that table must be
sorted by the total of points in that other table.......
so i need the totals of those points for a certain amount of players in that
table....
so i try to add some fields in that first table with the results i need and
then i can make a report and sorting them easily like i want them to be
sorted.....
i hope you understand this.....
and i agree, i am a self study user of ms access but
now my question: how can you create a report with condition of sorting not
with fields of other tables but with results of other tablefields....
thx for reply
greetings