Pavel Romashkin wrote:
Deano wrote: In the event that SQL returns no records, maybe?
True.
Just hoping someone else had the same experience of not being able
to assign a recordsource for a reason that might be not normally be
documented.
Try recreating the report. I found this to be the solution more than
once. When you step through the code do you actually see it assign the
recordsource? At the time it runs, create a DAO/ADO Rst with the same
SQL as the recordsource and check its recordcount to make sure it is
delivering what you expect. If yes, recreate the report.
Good luck,
Pavel
Ah, this is stupid.
Just found out what the problem is. It's the way you enter the dates. If I
enter 10/01/2003 and 11/04/2003 it works.
But if I enter my dates in a dd/mm/yy format i.e 01/10/2003 (1st of October
2003) and 04/11/2003 (4th of November 2003) as I want (and need to) then
the date range covers 10th January to 11th April where there are no records,
hence my empty recordsource.
How do I fix this? Everything is set up with format of dd/mm/yy and i'm now
looking at functions to ensure the input dates are converted correctly but
no luck so far.