Nothing wrong with the dates..
Have you looked at this :
These are NOT datesVB Code:
date1 = txtMonth1 & "/" & txtDate1 & "/" & txtYr1 date2 = txtMonth2 & "/" & txtDate2 & "/" & txtYr2
They are strings, thus format won't work on them.
If you wanted dates, you should've defined them as dates and enclosed the whole lot in CDate().
This means :
...would suffice.VB Code:
MsgBox "Flights between " & Format([b]CDate(date1)[/b], "dd/mmm/yy") & " and " & Format([b]CDate(date2)[/b], "dd/mmm/yy") datFlights.RecordSource = "SELECT * FROM tblFlight WHERE tblFlight.DDate BETWEEN #" & [b]date1[/b] & "# AND #" & [b]date2[/b] & "# ORDER BY tblFlight.DDate"
Also, someone else on the forum mentioned this before and I've found it helps clear up confusions; Use dd mmm yyyy formating from the text boxes as you won't get confused (nor will the user or the database) about american or english formatting.
Regards
Vince





Reply With Quote