G
Guest
I am trying to create a recordset using a date held in a control on the form
to which the event procedure applies.
In essence, the code is:
Select * From Issues Where Issues.LastUpdate = Forms!IssueStatus!CurrentDate
The control source of Forms!IssueStatus!CurrentDate is =Date()
When the event procedure runs, no records are added to the recordset.
However, if I 'hardcode' the date into the code:
Select * From Issues Where Issues.LastUpdate = #04/03/2006#
it extracts the records as expected but only if I reverse the order of the
date i.e. mm/dd/yyyy (04/03/2006) instead of dd/mm/yyyy (03/04/2006).
The format of Issues.LastUpdate is shortdate.
I can't work out why this is happening and would appreciate any help.
Thanks
to which the event procedure applies.
In essence, the code is:
Select * From Issues Where Issues.LastUpdate = Forms!IssueStatus!CurrentDate
The control source of Forms!IssueStatus!CurrentDate is =Date()
When the event procedure runs, no records are added to the recordset.
However, if I 'hardcode' the date into the code:
Select * From Issues Where Issues.LastUpdate = #04/03/2006#
it extracts the records as expected but only if I reverse the order of the
date i.e. mm/dd/yyyy (04/03/2006) instead of dd/mm/yyyy (03/04/2006).
The format of Issues.LastUpdate is shortdate.
I can't work out why this is happening and would appreciate any help.
Thanks