Date select in query

theKruser

Registered User.
Local time
Today, 15:42
Joined
Aug 6, 2008
Messages
122
I have a tbl that stores all my training dates. Some training items require multiple dates be recorded (i.e. quarterly recertification). My quandary comes in the form of most recent date selection.

I have multiple qrys that need to return only the most recent date for a given training item. I have tried implementing the DLookup function to no avail. I am not sure whether it is the wrong function to use or if I am just setting it up wrong. Any help would be greatly appreciated.

Thank you in advance.
 
Depending on how many date fields you have you could simply use a couple embedded IIf()s. Another option would be to create a simple function to evaluate the dates...
 
That was my question...I am not sure how to write the function. I know nothing about VB and I fear that is where my answer lies. I would rather write the code myself, but I am not quite sure how. Any help would be greatly appreciated.
 
Just a thought but would a first query of groupby training item and max date give the latest training date. this can then be joined back to the table on both fields to acquire any other data.

Brian
 

Users who are viewing this thread

Back
Top Bottom