From Allen Browne:
In VBA code, delimit dates with the "#" symbol. Regardless or your regional settings, Access expects these literal dates to be in the American format, e.g. #12/31/1999#.
you are using
Code:
Const conJetDate = "\#dd\/mm\/yyyy\#"
Allen's code is
Code:
Const conJetDate = "\#mm\/dd\/yyyy\#"
I used the below which appeared to work fine
Code:
Me.RecordSource = "SELECT * FROM tblCriminal where [decision_date] between #" & Me.txtdatefrom & "# and # " & Me.txtDateTo & "#"
you may want to use a filter.
You can format a field in your query to display the date as dd/mm/yyyy
Code:
Dim strFilter As String
strFilter = "[decision_date] between #" & Me.txtdatefrom & "# and # " & Me.txtDateTo & "#"
Me.Filter = strFilter
Me.FilterOn = True