Date Criteria

G

Guest

Hi,
I have a query for orders. each order has an order date.
What will be the expression for a new column in the query
that picks the smaller day? I need this date as criteria
for opening a chart report.

Ex.

OrderNo Date Expr: ????
1 25/10/2003
2 31/07/2003
3 22/08/2004
4 01/05/2003
5 16/08/2003

In order that Expr will display 01/05/2003

or what more efficient method do you suggest me to pick
the smallest day in a query?
I try sorting the Date field, but somehow when opening the
flitered report and passing to the detail section of the
report de Date, it alwys pass the last day corresponding
to the last order picked.
For the report i'm using a filter, because users choose
the orders from a listbox

ok the main issue is how the get the date, any help will
be aprreciated
thx.
 
J

Jeff Boyce

If you are looking for the oldest date, by itself, one approach is to sort
in your query, and set the Top property to 1 ("return one row from the
sorted list").

If you are having trouble with the report showing in sorted order, that's
because reports have their own sorting and grouping. No matter what you do
in a query (or table), you'll have to use the report's sorting and grouping.

Good luck

Jeff Boyce
<Access MVP>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top