ACC: Creating Functions Similar to DFirst and DLast (95/97) (146415)
The information in this article applies to:
- Microsoft Access for Windows 95 7.0
- Microsoft Access 97
This article was previously published under Q146415 Advanced: Requires expert coding, interoperability, and multiuser skills.
SUMMARY
By design, the DFirst() and DLast() functions always return the first and
last record that you entered in the underlying table, not the first and
last record as ordered by the table's index or the query's sort order.
DFirst() and DLast() ignore indexes, even primary keys and sort orders.
This article shows you how to write custom domain functions that you can
use in a way similar to DFirst() and DLast(). The DStart() and DEnd()
custom domain examples in this article return the first and last records
listed in a sorted query.
This article assumes that you are familiar with Visual Basic for
Applications and with creating Microsoft Access applications using the
programming tools provided with Microsoft Access. For more information
about Visual Basic for Applications, please refer to your version of the
"Building Applications with Microsoft Access" manual.
REFERENCES
For more information about BuildCriteria() function, search the Help Index
for "BuildCriteria Method."
Modification Type: | Minor | Last Reviewed: | 10/11/2006 |
---|
Keywords: | kbhowto kbProgramming KB146415 |
---|
|