Click here to Skip to main content
15,890,438 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have data like

names          date
jhon          11/11/2018
dj            11/12/2018
dj            11/10/2018
dj            20/12/2018
name11          20/12/2018


when i try to filer then only dates 01/12/2018 to 31/12/2018 then show 2 names of dj and name11 show and i try filter names then shows all dj not between 01/12 to 31/12.

What I have tried:

VB
Me.InvoiceSalesBindingSource.Filter = "[Party_Name] ='" & ComboBox1.Text & "'" & " Date >='" & TextBox1.Text & "' And Date <='" & TextBox2.Text & "'"
Posted
Updated 28-Dec-18 21:22pm
v2
Comments
Maciej Los 28-Dec-18 3:13am    
And...
What's your problem?
Arnav121 28-Dec-18 4:07am    
its error:-
{"Syntax error: Missing operand after 'Date' operator."} like this.
Richard MacCutchan 28-Dec-18 4:56am    
Most likely because the date format is not correct. Use DateTime types for accurate results.

i got solution some changes in code
VB
Me.InvoiceSalesBindingSource.Filter = "Date >='" & TextBox1.Text & "'And Date <='" & TextBox2.Text & "'And Party_Name ='" & ComboBox1.Text & "'"
 
Share this answer
 
Me.InvoiceSalesBindingSource.Filter = "Party_Name ='" & ComboBox1.Text & "' AND Date BETWEEN <pre>'" & TextBox1.Text & "' AND '" & TextBox2.Text & "'"
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900