Search Textbox string and two dates

  • Thread starter Thread starter Shahzadch
  • Start date Start date
S

Shahzadch

Guest
i am new to visual basic . looking help from experts.

i have search where i am getting string from text box and start date and then end date but my code is not giving me the right result.

da = New OleDbDataAdapter(" Select Invoice_Num,Veh_lic,Veh_VIN,Veh_unit, Veh_Company,Total,Invoice_Date,paymentstatus From Invoice Where Veh_lic ='" & Me.SrchPlatboxtxt.Text & "' AND Invoice_Date >='" & Format(DateTimePicker1.Value) & "' And Invoice_Date <='" & Format(DateTimePicker2.Value) & "' Order By Invoice_Num DESC", con)

i have lot of data in my database. if i use ( Me.SrchPlatboxtxt.Text Between datetimepicker1 and datetimempicker2 code brings all data from the database and display. i want that Veh_lic should display in between dates. please help

Continue reading...
 
Back
Top