0

i have a simple database where i want to sum Amount of one one text box at the footer of my form textbox. Am using access as the database

4
Contributors
8
Replies
26
Views
7 Months
Discussion Span
Last Post by Minimalist
0

i want the text box in my footer to show grand total whener i add new record

0

That's not the real problem. For VB, you could write an on change event handler that you sum it up and change the text box value as you wish. I often find folk struggling with this if they didn't complete a programming course or finish a book on programming in vb.net.

Answer: Use an on change event handler.

0

are you helping or judging? i havent gone to a programming course just learning on myself

0

Your choice. Now that I know you haven't completed eiither I hope you'll research the on change event and code that to do what you want.

1

Typically, if you want to display multirow data from a database you use a DataGridView rather than a Textbox. I'm assuming multirow otherwise you wouldn't need to do a sum.

0

O.K. I assume that you have added a totalsum row to your database which will give you a field that contains the total. If not then check this out:
https://www.gcflearnfree.org/access2016/how-to-create-calculated-fields-and-totals-rows/1/

To display this one field in your textbox you need a query against your database and display the result. Here is how to do this:
https://www.daniweb.com/programming/software-development/threads/461537/how-to-show-access-database-value-in-textbox

Edited by Minimalist

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.