>I have a grid on a form with a ado control and when I run the form the grid is populated. From a command button on the form how would I write the code to sum a field I have called amountTotal.
>
>New to VB,
>Thanks Randy
You can add another ADO control to your form and set the Recordsource property to an aggregate query like "SELECT SUM(Field1) FROM Table1 WHERE ..." and bind the result to a label.
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com