Date Criteria

  • Thread starter Thread starter Guest
  • Start date Start date
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.
 
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>
 
i'm looking for the oldest date but i can't use the top
property because I also need the rest of the dates for the
report chart. The oldest date i need it in order to save
it in variable and then give this date to de detail report
section in order that the chart know in which date to
start. otherwise is starting the last date recieved and is
there is an older date theres an Overflow error.

any idea of how the save the oldest date?
 
Back
Top