RCheesley
11-20-2008, 01:46 AM
Hi all,
I wonder if you can help, I've been searching but don't seem to be using the right terms!
I have various forms populating a table which includes 3 key dates, and I want to run various queries which return results from a table based on the following criteria:
Date a = column1
Date b = column2
Date c = column3
If date a is equal to or less than 2 days before date b
If date a is greater than 2 days before date b
If date a is greater than 2 days after date b
~~~
If date a is less than or equal to 4 weeks from date c
If date a is between 4 and 8 weeks from date c
If date a is greater than 8 weeks from date c
I am quite happy using the less than/greater than/equal to but rather than specifying a date (which would be useless) I need to reference another column in the table.
Is this possible, and if so what syntax would I use? This is where I am falling down as I can't work out what syntax to put under criteria, if indeed this is the way to accomplish the above tasks.
Ruth
I wonder if you can help, I've been searching but don't seem to be using the right terms!
I have various forms populating a table which includes 3 key dates, and I want to run various queries which return results from a table based on the following criteria:
Date a = column1
Date b = column2
Date c = column3
If date a is equal to or less than 2 days before date b
If date a is greater than 2 days before date b
If date a is greater than 2 days after date b
~~~
If date a is less than or equal to 4 weeks from date c
If date a is between 4 and 8 weeks from date c
If date a is greater than 8 weeks from date c
I am quite happy using the less than/greater than/equal to but rather than specifying a date (which would be useless) I need to reference another column in the table.
Is this possible, and if so what syntax would I use? This is where I am falling down as I can't work out what syntax to put under criteria, if indeed this is the way to accomplish the above tasks.
Ruth