Hello, Sorry for the delay.
The accepts is just here to process the Selection form check of field (date,...). Might it be because I hace 2 forms in my page (FORM and SQLFORM) ? for the sum it has been transformed to : if selection.accepts(request.vars,keepvalues=True): pass form=SQLFORM.grid(query) ###Paretto des couts### articles=db(query).select(db.Rebuts.Article, distinct=True) sumtest=db.Rebuts.CtReb.sum() summary=db(query).select(sumtest).first()[sumtest] liste=[]