highandwild
Registered User.
- Local time
- Today, 13:03
- Joined
- Oct 30, 2009
- Messages
- 435
Hi
I have a tabular form displaying accounts transaction data and two
date selectors on the header. Users select the period from and to date
and filter the data using a button.
I make up the WHERE clause using the following:
strWhere = "[TransactionDate] Between #" & Format(DateSerial(Year(Me.txtFromDate), Month(Me.txtFromDate), Day(Me.txtFromDate)), "dd/mm/yyyy") & "# And #" & _
Format(DateSerial(Year(Me.txtToDate), Month(Me.txtToDate), Day(Me.txtToDate)), "dd/mm/yyyy") & "#"
but the filter does not. I write a query definition using the where clause but this turns the month and the day around where an invalid date is not created.
e.g. 04/07/2012 becomes #07/04/2012#
My pc settings are dd/mm/yyyy and the table data displays alright when browsed.
Any ideas what I need to do?
Thanks
Justin
I have a tabular form displaying accounts transaction data and two
date selectors on the header. Users select the period from and to date
and filter the data using a button.
I make up the WHERE clause using the following:
strWhere = "[TransactionDate] Between #" & Format(DateSerial(Year(Me.txtFromDate), Month(Me.txtFromDate), Day(Me.txtFromDate)), "dd/mm/yyyy") & "# And #" & _
Format(DateSerial(Year(Me.txtToDate), Month(Me.txtToDate), Day(Me.txtToDate)), "dd/mm/yyyy") & "#"
but the filter does not. I write a query definition using the where clause but this turns the month and the day around where an invalid date is not created.
e.g. 04/07/2012 becomes #07/04/2012#
My pc settings are dd/mm/yyyy and the table data displays alright when browsed.
Any ideas what I need to do?
Thanks
Justin