Hi Everyone,
I have a query based on a subquery which filters the data between a date range which is entered on a form. It was running OK but when I tried to run it between 01/10/2004 and 31/05/2005 I got an error saying the the expression entered was incorrect or the query was too complex. I thought there was a problem with the date format because I'm using dd/mm/yyyy and I know Access likes to use mm/dd/yyyy but I have fixed that.
Then I thought that the amount of data was too much but when I run the same query from 01/09/2004 to 31/05/2005 (i.e.more records) it runs fine. I've been trying different dates and a very strange thing happens e.g. it will run if the start date is 29/09/04 but not if it is 30/09/04???? I am using the following expression in the criteria section:
>=Format([forms]![frmSalesCriteria].[StartDate],"dd-mmm-yyyy") And <=Format([forms]![frmSalesCriteria].[EndDate],"dd-mmm-yyyy")
Any suggestions?
Many thanks,
GPM
I have a query based on a subquery which filters the data between a date range which is entered on a form. It was running OK but when I tried to run it between 01/10/2004 and 31/05/2005 I got an error saying the the expression entered was incorrect or the query was too complex. I thought there was a problem with the date format because I'm using dd/mm/yyyy and I know Access likes to use mm/dd/yyyy but I have fixed that.
Then I thought that the amount of data was too much but when I run the same query from 01/09/2004 to 31/05/2005 (i.e.more records) it runs fine. I've been trying different dates and a very strange thing happens e.g. it will run if the start date is 29/09/04 but not if it is 30/09/04???? I am using the following expression in the criteria section:
>=Format([forms]![frmSalesCriteria].[StartDate],"dd-mmm-yyyy") And <=Format([forms]![frmSalesCriteria].[EndDate],"dd-mmm-yyyy")
Any suggestions?
Many thanks,
GPM