ACC: How to Fill a Table with Random Records from Another Table (170986)
The information in this article applies to:
- Microsoft Access for Windows 95 7.0
- Microsoft Access 97
This article was previously published under Q170986 Advanced: Requires expert coding, interoperability, and multiuser skills.
SUMMARY
This article demonstrates a method that you can use to fill a table with
random records from another table. The sample procedure in this article
uses Data Access Objects (DAO) to fill a table with a user-specified number
of records from an existing table. The following example randomly selects
records from the Orders table in the Northwind sample database and adds
them to a new table.
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 using a query to select random records, please
see the following article in the Microsoft Knowledge Base:
128874: ACC: Find N Records in Random Order
For more information about the Rnd function and the Randomize statement,
search the Help Index for "random numbers."
Modification Type: | Major | Last Reviewed: | 10/30/2003 |
---|
Keywords: | kbcode kbhowto KB170986 |
---|
|