Rainbowhawk
Registered User.
- Local time
- Today, 21:10
- Joined
- Oct 8, 2007
- Messages
- 54
Hi All
I need to modify a date query that currently looks like
Between #05/03/2007# and date())
I need to set it so that from the 05/03/08 it starts reporting a rolling 12 months
Which would normally look like
Between DateAdd("m",-12,Date())And Date()
However as I am on leave when this change needs to happen I am trying to create a query that would use the correct query depending on the date
I have got as far as
iif(date()>=#05/03/2007#,Between DateAdd("m",-12,Date()) And Date(),Between #05/03/2007# and date())
But this does not appear to work at all.
I also tried adding brackets to each part
iif(date()>=#05/03/2007#,(Between DateAdd("m",-12,Date()) And Date()),(Between #05/03/2007# and date()))
but this did not work either.
Any thoughts and suggestions would be appreciated.
I need to modify a date query that currently looks like
Between #05/03/2007# and date())
I need to set it so that from the 05/03/08 it starts reporting a rolling 12 months
Which would normally look like
Between DateAdd("m",-12,Date())And Date()
However as I am on leave when this change needs to happen I am trying to create a query that would use the correct query depending on the date
I have got as far as
iif(date()>=#05/03/2007#,Between DateAdd("m",-12,Date()) And Date(),Between #05/03/2007# and date())
But this does not appear to work at all.
I also tried adding brackets to each part
iif(date()>=#05/03/2007#,(Between DateAdd("m",-12,Date()) And Date()),(Between #05/03/2007# and date()))
but this did not work either.
Any thoughts and suggestions would be appreciated.