Hii
I am working on a project right now, and I have this problem that I spent lots of time trying to solve but couldn't ....
I am using VB6 and MS Access for the database .. I have a table in my database called TRequests and it has a date field of the format Short Date (mm/dd/yyyy), the field's name is ReqDate.
On the form the user should enter FromDate and ToDate , then the code should retrieve all records where ReqDate is between FromDate and ToDate ..
My code doesn't produce any errors but the report generated doesn't show and record and the record source seems to be empty !!!
Here is my code:
Please Help,
Thanks in Advance ..
I am working on a project right now, and I have this problem that I spent lots of time trying to solve but couldn't ....
I am using VB6 and MS Access for the database .. I have a table in my database called TRequests and it has a date field of the format Short Date (mm/dd/yyyy), the field's name is ReqDate.
On the form the user should enter FromDate and ToDate , then the code should retrieve all records where ReqDate is between FromDate and ToDate ..
My code doesn't produce any errors but the report generated doesn't show and record and the record source seems to be empty !!!
Here is my code:
Code:
FromDate = CDate(fromm & "/" & fromDayCmb.Text & "/" & fromYearCmb.Text) ToDate = CDate(tom & "/" & toDayCmb.Text & "/" & toYearCmb.Text) w = "Select * from TRequests where ReqDate >= #" & FromDate & "# " w = w & "And Reqdate <= #" & ToDate & "# " Set rs = cn.Execute(w)
Thanks in Advance ..
Comment