This topic is locked

lookup menu where expression to limit based on date

8/7/2009 11:59:45 AM
ASPRunnerPro General questions
M
mfred author

I want to limit what a looup menu displaced based on a date field in the table being used, so no more that the last 2 weeks of entried. Another way that might work would be to only show the last 20 entries. Any ideas on what that where expression would be?

J
Jane 8/10/2009

I'm not sure that I undrestand your question.

Could you clarify what does 'lookup menu' mean?

C
clig 8/10/2009

I want to limit what a looup menu displaced based on a date field in the table being used, so no more that the last 2 weeks of entried. Another way that might work would be to only show the last 20 entries. Any ideas on what that where expression would be?


Here is a sample condition that would limit a query to the previous week:
BETWEEN DATEADD(dd, - (DATEPART(dw, GETDATE()) + 6), GETDATE()) AND DATEADD(dd, - DATEPART(dw, GETDATE()), GETDATE())

  • so your dropdown would be a query with something similar as a filter on a date column