Finding first instance of value in table

glove008

New member
Local time
Today, 15:53
Joined
Oct 23, 2006
Messages
5
I have a table of documents including the "DocNum" (actual indentifier for that document, not the table key). Since each of the documents can appear several times, "DocNum"s can appear several times as well. I need to find the first instance of each "DocNum."

Any suggestions? Is there some kind of build "find the first instance of value xxxx" in access?
 
You can use a DLookup to find the first record that Access will find, but since the table is not necessarily stored in any meaningful manner, you will likely need to come up with a way to identify the record as being the first one entered for that document number. If you have a date/time stamp that would be helpful, or if you have an incrementing number, that can be useful. If it doesn't matter that it is the very first one entered for that document number then the DLookup would probably work just fine as it will find the first record that meets the criteria you give it.
 
This may help

Open your table in design view and and a new field called AddDate set the field type as Date/Time then set the default value as Now(). This will add the time and date to each new entry thus allowing you to run a query using the First search option.

Hope this helps

Ps the same method could be used witht he AutoNubmer option.
 

Users who are viewing this thread

Back
Top Bottom