Can anybody help whats wrong with this code ?
It considers date format sometime as DD/MM/YY and sometime MM/DD/YY... i am bit confused.
Private Sub cmdSearchDatewise_Click()
Dim strCriteria, task As String
If IsNull(Me.PoDateFrom) Or IsNull(Me.PODateTo) Then
MsgBox "Please Enter PO Date from ", vbInformation, "Date Range Required"
strCriteria = "([Lift_date] >= #" & Me.PoDateFrom & "# And [Lift_date] <= #" & Me.PODateTo & "#)"
task = "select * from tbllifting where (" & strCriteria & ") order by [Lift_date]"
When i put 20-03-2017 to 23-03-17 as date range, it shows proper filtered records. Fine.
But when i put 01-03-2017 to 23-03-17 as date range (PS : want details from 1st March to 23 March), it shows records from 3rd Jan 17 onwards.
Can anybody help Please ?