بازهم سوال
من شرط شمارو نوشتم خیلی خوب هم کار میکنه
الان میخوام 3 شرطیش کنم کد هم نوشتم نه اروری میده و نه چیزی سرچ هم نمیکنه
ممنون میشم یه نگاهی بندازید ، با تشکر
If txtname.Text = "" And txtDate.Text = "" And txtPrice.Text = "" Then
Me.BedehiBindingSource.Filter = "Name like '%%'"
MessageBoxFa.Show("شما موردی را جستجو نکرده اید", "خطا", MessageBoxButtons.OK, MessageBoxIcon.Error)
ElseIf txtname.Text <> "" And txtDate.Text <> "" And txtPrice.Text <> "" Then
Me.BedehiBindingSource.Filter = "Name like '%" & txtname.Text & " and Date ='%" & txtDate.Text & "'"
ElseIf txtname.Text <> "" And txtDate.Text = "" And txtPrice.Text = "" Then
Me.BedehiBindingSource.Filter = "Name like '%" & txtname.Text & "%'"
ElseIf txtname.Text = "" And txtDate.Text <> "" And txtPrice.Text = "" Then
Me.BedehiBindingSource.Filter = "Date ='" & txtDate.Text & "'"
ElseIf txtname.Text = "" And txtDate.Text = "" And txtPrice.Text <> "" Then
Me.BedehiBindingSource.Filter = "Price ='" & txtPrice.Text & "'"
End If
خودم احساس میکنم ایراد از این خط هست
Me.BedehiBindingSource.Filter = "Name like '%" & txtname.Text & "%' and Date ='" & txtDate.Text & "'"
منم دنبالش رو نوشتم منتها اینجا حذفش کردم
Me.BedehiBindingSource.Filter = "Name like '%" & txtname.Text & "%' and Date ='" & txtDate.Text & "%' and Price ='" & txtPrice.Text & "'"
به این صورت بود
بازم ممنون