how to add a result to a textbox from the database
i want to calculate the sales commission for each sales person! i have three tables one is the customer table,Sales Person table and the sales person commission table. the customer table is where the total amount payed is stored, the table also contains a foreign key of the sales person number which is the primary of the sales person table. The sales person table contains the sales person details. the sales person commission table contains the Record No,Sales Person number,no.of.sales made,commission percentage received,total commission and the month. the total commission is automatically calculated. i have a query which calculates the sum of the total amount payed by the customer for a particular sales person eg
"Select SUM(Total_Amount) from Customer_Table where SP_No='"+textBox1.text+"'";

how do i put this result into a text box so that the i dont have to enter the no.of sales made in my sales commission form?????

thanks in advance

how to add a result to a textbox from the database
===

i want to calculate the sales commission for each sales person! i have three tables one is the customer table,Sales Person table and the sales person commission table. the customer table is where the total amount payed is stored, the table also contains a foreign key of the sales person number which is the primary of the sales person table. The sales person table contains the sales person details. the sales person commission table contains the Record No,Sales Person number,no.of.sales made,commission percentage received,total commission and the month. the total commission is automatically calculated. i have a query which calculates the sum of the total amount payed by the customer for a particular sales person eg
"Select SUM(Total_Amount) from Customer_Table where SP_No='"+textBox1.text+"'";

how do i put this result into a text box so that the i dont have to enter the no.of sales made in my sales commission form?????

thanks in advance
