showing the first date of many

access my brain

New member
Local time
Today, 04:00
Joined
Aug 21, 2003
Messages
8
I have a form with several 'start' and 'end' date fields on it. I'd like to add another field which looks at all the start fields and gives the 'earliest date' record and also for the lastest date.

this is a probably a really easy question but i'm getting nowhere
:-(

any help much appreciated
 
As the ControlSource of a textbox where StartDate is a field in the form's underlying recordsource...

=Min([StartDate])
 
That is if you have 1 field in table view

If you have many fields in 1 records you can delimit it...

Min(Field1;Field2;...) [maybe replace ; by ,]

Do the reverse with Max...

Regards
 
When I try the following I still get an error message

=Min(ukstart,italystart)

"The expression has invalid syntax, you may have entered an operand without an operator"

also tried

=Min([ukstart],[italystart]) and semi-colon as well
 
Try looking at the help... My Access is busted at the moment so cant do it for you sorry...

Regards
 
Well was unable to workout the max as well so i tryed another approach...

i have this table
Code:
Date1    Date2    Date3    UID
1-1-2003 3-1-2003 2-1-2003 1
2-2-2003 5-2-2003 1-2-2003 2
Table name: Table2
And running this query:
Code:
SELECT UID as ID, Max(MyDate) AS MaxOfMyDate
FROM [SELECT Table2.UID as UID, Table2.Date1 as MyDate FROM Table2
union
SELECT Table2.UID, Table2.Date2 FROM Table2
union 
SELECT Table2.UID, Table2.Date3 FROM Table2]. AS [GreatUnion]
GROUP BY UID;
Returnes:
Code:
ID	MaxOfMyDate
1	3-1-2003
2	5-2-2003
I hope this is what your wanting to do...

Regards

The Mailman
 

Users who are viewing this thread

Back
Top Bottom