Print selected records

  • Thread starter Thread starter Howe
  • Start date Start date
H

Howe

Guest
I am designing a database in access and would like to know how to design a macro or query with a check box ( or whatever would work )would perform the following. In the form when checked it would allow only those records, when checked, to be printed.
 
In your query put a -1 (minus 1) in the Criteria line in the Print column then only records with a check box will be selected. Base your report on the query.
 
Jack thanks for your help, When you say insert in the print column in the query where exactly do you put it in the query. Do you just add PRINT as a column to other fields. ( Address,name, unit number, ect)Then in the form design I noticed when I add a checkbox when it is checked all the boxes in all records show a check when unchecked all records uncheck.What am I doing wrong.
 
Put all the fields you want in your report in a query. Lets say you want to print all the records of where RENTPAID is checked (meaning "yes" in a yes/no datatype field).

On your query grid, there will be a row for Criteria: to the left. Under your field [RENTPAID] and on this criteria line put the work Yes. When you run the query, all records where [RENTPAID] is Yes (checked) will be returned.

Create your form from that query. If you already have the report done and don't want to change it all, open your report in design view, goto the report properties and change the data control source to the query you just made. So long as the field names are the same as they were in the previous data source (which they probably are if it was off of a table), everything will work out fine.

Jack's reference to -1 is the value Access gives to a "Yes". "No" receives a 0 zero value. You could put -1 also versus "Yes" on your criteria.
 
jwindow has got it right. I had assumed that you had a Yes/No field called Print already in your table. If you do not then add one. Now when in the form the user will check this box and then my answer and jwindon's answer will do the trick for you.
 
Thanks guys you’re the greatest! – It worked like a charm – I really appreciate you’re time and help
 

Users who are viewing this thread

Back
Top Bottom