ACC2000: How to Print Randomly Selected RecordsID: Q207593
|
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
Query: updExample
------------------
Type: Update Query
Field: ysnPrint
Table: tblExample
Update To: No
Criteria: Yes
For more information about update queries, click Microsoft Access Help on the
Help menu, type "update queries, creating" in the Office Assistant or the Answer Wizard,
and then click Search to view the topics returned.
For more information about creating check boxes, click Microsoft Access Help on the
Help menu, type "check boxes, creating" in the Office Assistant or the Answer Wizard,
and then click Search to view the topics returned.
Additional query words: limit inf
Keywords : kbprint kbdta GnlOthr
Version : WINDOWS:2000
Platform : WINDOWS
Issue type : kbhowto
Last Reviewed: May 13, 1999