My program has 3 fields namely title, start date and end date for the user to enter. I wish to populate my listbox which is called "filteredResults" with results that contains records with tiles equal to the one entered by the user OR that falls into the range of the date.
May I know:
1) How can I populate the listbox with the recordset obtained from the query?
2) How can I compare the date inside the query?
Thanks a lot!
Private Sub FilterProj_Click()
Dim title As String, startDate As Date, endDate As Date
Dim db As DAO.Database
Dim rs As DAO.Recordset
Set db = CurrentDb
Set rs = db.OpenRecordset("SELECT * FROM Project WHERE ORDER BY [ProjectId] DESC")
filteredResults.Recordset = rs