Date Dispaly

M

May

Hi, Expert:

I am new to Access. Would you please tell me how to find out the earliest
date among more than two dates in the dame fields? When I design a report, I
need to display the earliest date. Youe help is much appreciated.

May
 
K

Ken Sheridan

May:

In a report you'd normally use the Min function in the ControlSource of an
unbound text box for this. The text box would usually, but not necessarily,
be either in a group footer, to return the earliest date in a group of
records, or in the report footer to return the earliest for all records. Say
you have a field MyDate then the text box's ControlSource property would be:

=Min([MyDate])

You can also do it in what Access calls a 'totals' query. Again this would
normally be grouped on one or more fields or expressions, though you can also
simply return the value for all records in a single row result set.

If you need more specific advice post back with details of the context in
which you want to do this.

Ken Sheridan
Stafford, England
 
J

John W. Vinson

Would you please tell me how to find out the earliest
date among more than two dates in the dame fields?

Well, "dame fields" is clearly a typo - but it's not clear just what
you want. Is there just one Date/Time field in your table, and you
want to retrieve information from the record with the earliest date?
Would this be the single record in the entire table with the earliest
date, or the earliest date in a group of related records? More info
please!

John W. Vinson [MVP]
 
M

May

This is about student progress report. I want to report when a student was
first-time admitted and when a student was successfully promoted from 1st
year to 2nd year; or to 3rd year; and to 4th year, then got a degree, of
which I use a field “Year In Program†to hold the data. In my report, I nee
to report “Year In Program†and grouped students by different Admission
Sitesâ€; then “Promotion Dateâ€, and then “Year In Programâ€.

One example could be like this: a student was admitted in September 2000,
and withdrew in 2002 due to sick leave; and re-admitted again in May 2003,
then left again and came back again in September 2004, and finally got a
degree in 2007. In my application, a field “AdmDate†with date type is used
to hold all the admission records (could be more than 3, sometimes, student
withdrew many times). I need to track how many times a student left and then
came back.

I have tried to use =Min([AdmDate]), it works for me. The field shows the
earliest data only. Now I am having another problem. Because the report shows
three duplicated identical lines. I understand that this is because there
are three different AdmDate in the data source. If I use “Hide Duplicateâ€
for the control, the same AdmDatei for another student in the same report
will disappear, and only one AdmDate is visible. Due to my required sorting
order, this became awkward not good. The idea situation is to display each
unique record for each unique student, in my case, many fields could be the
same but not student name, for instance.

Tons of thanks for the help!

StudentID AdmDate AdmSite Year_in_Program Term
190 10/19/1999 A 3 Semester Fall 2003
190 09/08/1998 A 3 Semester Fall 2003
190 03/19/2002 A 3 Semester Fall 2003

Ken Sheridan said:
May:

In a report you'd normally use the Min function in the ControlSource of an
unbound text box for this. The text box would usually, but not necessarily,
be either in a group footer, to return the earliest date in a group of
records, or in the report footer to return the earliest for all records. Say
you have a field MyDate then the text box's ControlSource property would be:

=Min([MyDate])

You can also do it in what Access calls a 'totals' query. Again this would
normally be grouped on one or more fields or expressions, though you can also
simply return the value for all records in a single row result set.

If you need more specific advice post back with details of the context in
which you want to do this.

Ken Sheridan
Stafford, England

May said:
Hi, Expert:

I am new to Access. Would you please tell me how to find out the earliest
date among more than two dates in the dame fields? When I design a report, I
need to display the earliest date. Youe help is much appreciated.

May
 

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