Avatar of davecocks
davecocks
 asked on

bindingSource.Filter not working

Hi,

Table:                      diveDetails
field:                         diveDate
Form:                    frmDiveSurveyList
DatePicker:            datePickerSurveyList
 
I'm trying to filter a binding source to the changing of a dateTime picker from on the same form

I'm getting this error:

'syntax error: Missing Operand after 00 operator'

DiveDetailsListingsBindingSource.Filter is returning "diveDate Like 25/02/2009 00:00:00"

Thanks
Private Sub datePickerSurveyList_ValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles datePickerSurveyList.ValueChanged
 
DiveDetailsListingsBingingSource.Filter = "diveDate Like " & datePickerSurveyList.Value.Date.ToString()
 
End Sub

Open in new window

.NET ProgrammingVisual Basic Classic

Avatar of undefined
Last Comment
davecocks

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
mildurait

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
davecocks

ASKER
Hey, thanks for your reply,

You were right about the delimiters and the equals,
This worked in the end

"diveDate=' " & datePickerSurveyList.Value.Date.ToString() & " ' "
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck