View Full Version : select specific records to print a report


deepbreath
06-09-2001, 04:36 AM
i have put a table on my form which displays three fields of whole database. what i am trying to do is to put check box in front of each of them so that user can select any number of records by checking the box. then by pressing a command button it prints a specific report of those checked records.
can anyone help me
thanx

jimbrooking
06-09-2001, 05:11 AM
Here's something that might work:

1. Add a Yes/No-type field to the underlying table (call it "tblSample"), call it "Print"
2. When you open your form, reset this field in all the rows to No/False. Something like
Docmd.Runsql "Update tblSample Set Print = False Where Print = True"
might work for the reset - some debugging may be required. http://www.access-programmers.co.uk/ubb/smile.gif
3. When the user clicks the command button you can
Docmd.OpenReport "rptSelectedSamples",,,"Print"
which opens your report with the filter "Print" or "Print=True" or "Print is Checked".

deepbreath
06-10-2001, 12:38 AM
plz be give me more clues. i have a form with displays result after a search in datasheet view. i want to put checkbox in front of name field. so that when a list of names comes up i can select the names which will be include in report by pressing a command button.

thankx

jimbrooking
06-10-2001, 05:38 AM
See your "how to do this?" inquiry. Solution emailed a minute ago.