Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Data between Date Range..

Avatar of crystalsoft
crystalsoft asked on
Programming Languages-OtherMicrosoft AccessVisual Basic Classic
3 Comments1 Solution596 ViewsLast Modified:

i want data between first date to last date

but why data is not displaying in datagrid1

but when i remove date range then statement working fine.
so i dont know whats wrong with query..

If Rs.State = 1 Then Rs.Close
          Rs.Open "Select Invo_Dtl.Invo_No, Invo_Dtl.Invo_Date as _Invo_Date_, Invo_Dtl.Invo_From as _From, Invo_Dtl.Invo_To as _To, Invo_Dtl.Invo_Truck_No as Truck_No, Invo_Dtl.Invo_TP_No as TP_No, Invo_Dtl.Invo_TP_Date as TP_Date, Invo_Dtl.Invo_Amount as Net_Amount, Invo_Dtl.Invo_Load as _Loading, Invo_Dtl.Invo_Insu as Insurance, Invo_Dtl.Invo_Vat_Cst as VAT_CST, Invo_Dtl.Invo_Total from Invo_Dtl where Invo_Dtl.Invo_Date >=#" & DTPicker1.Value & "# and Invo_Dtl.Invo_Date <=#" & DTPicker2.Value & "# and Invo_Dtl.Invo_Compy = '" & Text1.Text & "' and Invo_Dtl.Invo_Customer = '" & Text2.Text & "'", con, adOpenKeyset, adLockPessimistic
    If Rs.RecordCount > 0 Then
    Set DataGrid1.DataSource = Rs
Avatar of Romasa
RomasaFlag of Pakistan image

Our community of experts have been thoroughly vetted for their expertise and industry experience.

This problem has been solved!
Unlock 1 Answer and 3 Comments.
See Answers