Selecting only certain fields in query based on dates

JTQ911

Registered User.
Local time
Today, 08:21
Joined
Jul 26, 2007
Messages
83
Hello everybody. I have a table that lists the serial number of a device along with a dozen or so different tests this device undergoes before being shipped to our customer. How can query a device by Serial Number and only have it display the field representing the latest stage of testing. The data type for each test is Date.

For example, because I never think my explanations make sense.

If I run the query and enter 3050 for the [SN], and it underwent [Test1] on 8/1/08 and [Test2] on 8/2/08 and [Test3] on 8/3/08...Is it possible to have the query return

SN Test 3
3050 8/3/08


I know my table structure could probably be better but this is the last day for the project, it needs to get done. Is there a way to do this? Thank you in advance everyone.
 
Hi,

what you can do is sort your query by the date field in descending order, so that the latest record will be on top and then from the query properties set the TOP property to 1 so that it will return your latest record.
 

Users who are viewing this thread

Back
Top Bottom