Hello everyone. I've been working on a database in MSAccess2007 and had to convert it to 2003. I have a line of code which returns a requested date range from a query to a listbox:
After converting, it stopped working. Returns nothing. Any idea how to solve this?
Code:
Dim MySQL As String
MySQL = "SELECT * FROM qryContLife WHERE 1=1"
If IsDate(Me![StartDate]) And IsDate(Me![EndDate]) Then
If CDate(Me![StartDate]) < CDate(Me![EndDate]) Then
mycriteria = mycriteria _
& " AND [Depot In Date] Between #" _
& Format(Me![StartDate], "yyyy/mm/dd") _
& "# And #" _
& Format(Me![EndDate], "yyyy/mm/dd") & "# "
End If
End If
MyRecordSource = MySQL & mycriteria
Me![lstContList].RowSource = MyRecordSource
After converting, it stopped working. Returns nothing. Any idea how to solve this?