Criteria Problem Question

accesser

Registered User.
Local time
Today, 18:58
Joined
Mar 17, 2003
Messages
54
I have a very important question. It is logically easy but the problem is how to write the criteria. it is as follow:

I have table "EmpCardholders". It consists of the fields:

-Name as text
-CardNo as text
-JoiningDate as date/time

None of its fields is indexed (distinct). it could be repeated.
I have the variablea
-"Etime" as date.
-CNO as string

What I want is to find the maximum DMax value of the "JoiningDate" field where this value is datediff("s",joiningdate,Etime)>=0 and "CardNo"=CNO.

Please Help Me.

Thanks
 
You may have to create two queries. The first with your criteria, then create another query based on this query where you use the MAX. Or you could just do the DMAX against the initial query.
 

Users who are viewing this thread

Back
Top Bottom