I am using the following to search an database:
Private Sub Command1_Click()
Data1.RecordSource = "SELECT * FROM dates WHERE Date BETWEEN #" & Text1.Text & "# AND #" & Text2.Text & "#;"
Data1.Refresh
End Sub
Private Sub Command2_Click()
Data1.RecordSource = "SELECT * FROM dates order by year(Date), month(Date), day(Date)"
Data1.Refresh
End Sub
the problem is that after the search between two dates is completed the dates are not in order, hense Command2. However this refreshies the current search and lists all the dates in the database![]()
If I try it the other way its the same result
Any help?![]()




Reply With Quote