dutch09
Programmer
- Feb 27, 2009
- 1
I have a datagrid on a web form populated from a sql database table; no problem there. On the same form I have a textbox that I'd like to populate with the 'sum' value of one of the table's fields. Seems simple enough. I don't seem to have any errors in the code, just no output to the textbox. Where is my error? Can someone point me in the right direction?
Protected Sub ytdFuel_TextChanged(ByVal sender As Object, ByVal e As EventArgs) Handles ytdFuel.TextChanged
Dim sql
Dim SumOfQuantity As New Integer
sql = "SELECT Sum(Quantity) As SumOfQuantity FROM Fuel"
Me.ytdFuel.Text = ("[SumOfQuantity]")
End Sub
Protected Sub ytdFuel_TextChanged(ByVal sender As Object, ByVal e As EventArgs) Handles ytdFuel.TextChanged
Dim sql
Dim SumOfQuantity As New Integer
sql = "SELECT Sum(Quantity) As SumOfQuantity FROM Fuel"
Me.ytdFuel.Text = ("[SumOfQuantity]")
End Sub