B
Bryan Hughes
Hello,
I am trying to figure out the best way to create a query that will give the
oldest date in set of records.
my current query looks like this.
'Variables
dtmToday = Date
dtmEligiblity = DateAdd("m", -36, dtmToday)
mstrSQL = "SELECT CDID, FN, LN, MI, DOB "
mstrSQL = mstrSQL & "FROM tblClient "
mstrSQL = mstrSQL & "WHERE CFID ='" & strCFID & "' AND "
mstrSQL = mstrSQL & "DOB >=#" & dtmEligiblity & "#;"
This works fine if only one record matches this criteria, but how would I
get the oldest DOB if multiple records match this criteria?
-TFTH
Bryan
I am trying to figure out the best way to create a query that will give the
oldest date in set of records.
my current query looks like this.
'Variables
dtmToday = Date
dtmEligiblity = DateAdd("m", -36, dtmToday)
mstrSQL = "SELECT CDID, FN, LN, MI, DOB "
mstrSQL = mstrSQL & "FROM tblClient "
mstrSQL = mstrSQL & "WHERE CFID ='" & strCFID & "' AND "
mstrSQL = mstrSQL & "DOB >=#" & dtmEligiblity & "#;"
This works fine if only one record matches this criteria, but how would I
get the oldest DOB if multiple records match this criteria?
-TFTH
Bryan