ACC: How to Print Randomly Selected RecordsID: Q187899
|
This article describes a method that you can use to print records that are randomly selected.
There may be occasions where you need to print a selection of records that do not have a common criteria. For example, you may need to send an acknowledgment to each customer who responded to a survey, but you do not want to keep a permanent record of these responses. To do this, you need to add a Yes/No field to a table, add a check box to a form, and build two new queries. The first query will be a select query that you will use as the record source for the report; the second query will be an update query that you will use to reset the Yes/No field. This example uses the sample database Northwind.mdb.
Table: tblExample
-----------------
Field Name: ysnPrint
Data Type: Yes/No
Required: No
Indexed: No
Form: frmExample
-------------------------
Caption: Print
RecordSource: tblExample
Check box:
--------------------------
Name: chkPrint
ControlSource: ysnPrint
Label:
------------------------
Name: lblPrint
Caption: Print Record
Query: qryExample
--------------------
Type: Select Query
Field: tblExample.*
Table: tblExample
Field: ysnPrint
Table: tblExample
Show: No
Criteria: Yes
qryExample
Query: updExample
--------------------
Type: Update Query
Field: ysnPrint
Table: tblExample
Update To: No
Criteria: Yes
For more information about update queries, search the Help Index for
"update queries, creating," or ask the Microsoft Access 97 Office
Assistant.
For more information about creating check boxes, search the Help Index for
"check boxes, creating," or ask the Microsoft Access 97 Office Assistant.
Additional query words: limit
Keywords : kbdta GnlOthr
Version : WINDOWS:7.0,97
Platform : WINDOWS
Issue type : kbhowto
Last Reviewed: April 22, 1999