First Record Only

D

Dan @BCBS

I need to know who entered a record first.
I have a table that records data every time a record is changed, it just
dumps data into another table on close.
That table is part of another query. In this other query I want only the
first record.
So, I choose First in the Total column.

Here is an example of the results:
With First picked in Total = 8/7/08 and another 8/7/08 and 8/11/08
Without First picked (Group By picked) = 8/7/08,8/7/08,8/8/08,8/11/08,8/12/08

This makes no sense, why does "first" not give me only the first one?
And, How can I limit this query to only the first one?
Thanks
Dan
 
K

KARL DEWEY

I would guess that you are also pulling other fields that are not identical
data so you get all the combinations.
Either use a subquery or a separate query to find first and join in main
query.
 
J

John W. Vinson

I need to know who entered a record first.
I have a table that records data every time a record is changed, it just
dumps data into another table on close.
That table is part of another query. In this other query I want only the
first record.
So, I choose First in the Total column.

Here is an example of the results:
With First picked in Total = 8/7/08 and another 8/7/08 and 8/11/08
Without First picked (Group By picked) = 8/7/08,8/7/08,8/8/08,8/11/08,8/12/08

This makes no sense, why does "first" not give me only the first one?
And, How can I limit this query to only the first one?
Thanks
Dan

The "First" operator is misleading. It gives the first record *in disk storage
order* - an order which you cannot control, and need not be chronological!

If you want to limit the query to that with the earliest date, use a Subquery
as a criterion:

=(SELECT Min([datefield]) FROM yourtable AS X WHERE <optional criteria>)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top