PDA

Click to See Complete Forum and Search --> : ACCESS 2000, SUM QUERY FROM FORM


cartrik28
Nov 15th, 2000, 01:58 PM
I have an access database with a field named "Weight". I have created specific querys. Now I want to bring the sum of the querys into textboxes on a form. Can someone help .

Thanks in advance!!!

[Edited by cartrik28 on 11-15-2000 at 03:06 PM]

kovan
Nov 15th, 2000, 02:12 PM
if you know ado and sql
your sql statement would look like this

SQLstatement = "SELECT Sum(weight)as TotalSum FROM Mytable"
RS.open sqlstatement, conn 'where conn is your connection and rs is your recordset
txtSum.text = RS!TotalSum
RS.close