Get First date from a set of record

M

msun65

Please help me create a function to

1. returns a value of 1 if the expression ("date") is the first date
from a specified set of records.
2. returns a value of 2 if the "date" is the second date from a
specified set of records that meets the following criteria:
 
M

msun65

On Jun 16, 7:59 pm, [email protected] wrote:
Please help me create a function to

1. returns a value of 1 in a query if the expression ("RecDate") is
the first date
from a specified set of records.
2. returns a value of 2 in a query if the "RecDate" is the second
date from a
specified set of records that meets the following criteria:
a. the year of the subsequent record does not equal the year of the
first "date"
b. the subsequent record is equal or less the 3 years of the first
"RecDate"
c. the subsequent record does not equal "GLyear" of the first
"RecDate"'s "GLyear"

If item 2 above does not meet the criteria, it returns a value of 0 in
a query.
 
Top