Rather simple task which I can't solve...
I want to put sum of "points" row from table into textbox.
VB Code:
Dim sum_fld As Long = 0 Dim fr_day As Date = DateTimePicker1.Text Dim to_day As Date= DateTimePicker2.Text Dim con As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\dbase.mdb") Dim com As OleDbCommand = Nothing con.Open() com = New OleDbCommand("SELECT SUM(points) FROM table WHERE [ws_date] BETWEEN" & Chr(34) & fr_day & "AND" & Chr(34) & to_day & Chr(34), con) >>>>>> what to put here??<<<<<<<<<< textbox1.Text= sum_fls.ToString Catch ex As Exception If con.State = ConnectionState.Open Then con.Close() End If End Try
I want to put sum of "points" row from table into textbox.