Using another date as a criteria?

RCheesley

Registered User.
Local time
Today, 22:59
Joined
Aug 12, 2008
Messages
243
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
 
Last edited:
Think I've managed to figure it out using expressionbuilder ... a bit of a cheat but got the syntax right!
 
Think I've managed to figure it out using expressionbuilder ... a bit of a cheat but got the syntax right!

I presume that's what its there for although I've never used it myself, but then being a bloke I don't read manuals till all else fails. :D

Brian
 
Well that's very much the same approach I take (does that make me an honorary bloke?!?!?!) .... but this was annoying me .. turned out I had speechmarks where I didn't need them .... s'all good now though :)
 

Users who are viewing this thread

Back
Top Bottom