What is the best way to go for getting Data from either Datagridview or an SQL Table

  • Thread starter Thread starter Gary Simpson
  • Start date Start date
G

Gary Simpson

Guest
Hi Good People.

I have created a form with 3 textboxes and 2 DateTimePickers

textbox1 I have called; TxtDateFrom, With DateTimePicker1 Called DtpFrom set behind TxtDateFrom.

textbox2 I have called TxtDateTo with DateTimePicker2 Called DtpTo Set behind TxtDateTo

What is the best way to go to search a Database or DataGridView and return a Value.

Basically Is what I trying to achieve is when I select a Date From, Using " DtpFrom " then select a second Date To Using " "DtpTo".

And Once I have selected those two Dates and click a button Is what I want is to search from all the monies that has been taken between the dates selected, And then put the total Value of Values into a textbox. How do I go about this.

Code I started with:

If SQL. RecordCount <1 Then Exit Sub

SQL.RunQuery ("Select * From JobsComplete " )

Can one of you good people show or tell me the way to go, about getting a total Value from 1 column using 2 set of dates. The problem is I only have one column with a Date.

1602727.png


Kind Regards

Gary





Gary Simpson

Continue reading...
 
Back
Top