How do I bring last record from a related table into a report or query? Main table is Name File with address history being the second table. Need to bring forward that last record from the address history table to a report.
If you have 10 records that are similar and you want the last one try adding a Time field when it's written out so the last one has the latest time.<br>Or you could add an Autonumber field so each record is unique number and the last one has the highest number.<br>Query by that number in Descending Order (largest number will be on top). <p>DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br> Ask me how Bar-codes can help you.
Try the DLAST() function<br><br>From MS FAQ Q109380:<br>DFirst() and DLast() ignore sort orders and indexes, even Primary Keys. These functions are intended to return data from the first or last record entered into the table, not the first or last record in a given sort order. <br><br><br>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.