Andy Lacey
andy at minstersystems.co.uk
Tue Sep 30 11:03:39 CDT 2003
There's no doubt several ways but here's one: Create a function called, say, MaxDt which takes two parameters and returns the higher of the two, like: Public Function MaxDt(dt1 as Date, dt2 as Date) as Date 'You'll need to modify this to cater for nulls if dt1>dt2 then MaxDt=dt1 else MaxDt=dt2 end if End Function Then your control's source can be: =MaxDt(fld6,MaxDt(fld5,MaxDt(fld4,MaxDt(fld3,MaxDt(fld1,fld2))))) But if you go this route then as I pointed out above you'll need to work on that function a little bit to cater for fields with nulls. -- Andy Lacey http://www.minstersystems.co.uk --------- Original Message -------- From: "Access Developers discussion and problem solving" <accessd at databaseadvisors.com> To: "Access Developers discussion and problem solving" <accessd at databaseadvisors.com> Subject: RE: [AccessD] Pull Most Recent Date: 30/09/03 15:53 Just the date in Question -----Original Message----- From: Andy Lacey [mailto:andy at minstersystems.co.uk] Sent: Tuesday, September 30, 2003 9:38 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Pull Most Recent Mike Do you want to show the field name or the date in question? -- Andy Lacey http://www.minstersystems.co.uk --------- Original Message -------- From: "Access Developers discussion and problem solving" <accessd at databaseadvisors.com> To: "Access Developers discussion and problem solving" <accessd at databaseadvisors.com> Subject: [AccessD] Pull Most Recent Date: 30/09/03 15:35 This is probably an easy one but I am stumped... I have 6 fields within my table that have dates in them, how can I pull and display on a form which field has the most recent date in it? Thanks in advance for any help... Mike _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com ________________________________________________ Message sent using UebiMiau 2.7.2 _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com ________________________________________________ Message sent using UebiMiau 2.7.2