I have a query in form which has two date-pickers, a start date (txtDateStart) and finish date (txtDateFin), both being in UK format (dd/mm/yyy). The query runs OK but shows no results. The code is”
If I remove the last AND portion the query runs OK but all results show, not those restricted to the selected date. The code is:
How can I get Access to recognise the date (if that is the problem). Thank Sandy
Code:
If Not IsNull(Me.txtDateStart.Value) Then
strSQL = strSQL & " AND tblHourEnter.Week_Ending>=" & Me.txtDateStart.Value & " AND tblHourEnter.Week_Ending<=" & Me.txtDateFin.Value & " "
End If
Code:
If Not IsNull(Me.txtDateStart.Value) Then
strSQL = strSQL & " AND tblHourEnter.Week_Ending=" & Me.txtDateStart.Value & " "
End If