I am using VS2010 and Microsoft Access Database 2013 in which each row (Record) has a Date Field called ActionStartDate, I want to view all the records for which the date lies between two dates which the user determines using two DateTimePickers , but there is an error message before the application debugging with the following error correction options:
The first
Too many arguments to 'public overridable overloads function
SearchBetweenDates4ActionStartDate (datatable as GSKAction DB dataset actionslog datatable) as integer'
The second
Generate method stub for 'SearchBetweenDates4ActionStartDate in 'GSK Employee Actions Manager.GSK EmployeeActionsDB Dataset table adapters.actionslogtable adapter'
My code is below.
Private Sub Button2_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim Search1 As Date = DateTimePicker1.Value.ToShortDateString
Dim Search2 As Date = DateTimePicker2.Value.ToShortDateString
Me.ActionsLogTableAdapter.SearchBetweenDates4ActionStartDate(Me.GSKactionsDBDataSet.ActionsLog, Search1, Search2)
Form48.MdiParent = Form27
Form48.Show()
Form48.ActionsLogTableAdapter.SearchBetweenDates4ActionStartDate(Form48.GSKactionsDBDataSet.ActionsLog, Search1, Search2)
End Sub
And my Query is as follows:
Method Name: SearchBetweenDates4ActionStartDate
SELECT ID, ActionReferance, ActionDescription, ActionSite, ActionCategory, ActionImportance, ActionAccountability, ActionProgressStatus, ActionClosurestatus, ActionDoneBy,
ActionComment, ActionYear, ActionStartDate, PlannedClosureDate, RealClosureDate, ActualClosureDuration, PlannedClosureDuration
FROM ActionsLog
WHERE (ActionStartDate BETWEEN DateTimePicker1.[Value] AND DateTimePicker2.[Value])
Thanks for any help.