Hiding records on reports by checkbox on form

O

oliaccount

Hi, I'm in the proccess of buliding a new database. Its purpose is to store
various organisation contact details and then to produce reports based on
this that can be printed onto sticky labels. This much or basically finished.
However, we naturally don't want to print the whole database every time, so
I'm using a checkbox on the interface form that will filter the report so
that only checked records are prepared for printing. Can anyone tell what
code I need to use to do this, and where? I've tried various methods, but
nothing seems to work. I'm using accesss 2003 by the way. Thanks.
 
A

Allen Browne

Presumably you added a yes/no field to your table, so you can check the box
for the records to print?

If so, create a query using this table.
In the Criteria row under your yes/no field, enter:
True
The query shows only those records where the box is checked.

Now set the RecordSource property of your report to the name of this query.
 
O

oliaccount

Solved it with a macro to open the report on a command button with the
following code:
[Labelling Query]![checkbox]=True
Thanks for the tip though, I forgot that yes/no could be so simply used. All
my efforts were clearly overcomplicated. Thanks, I'll keep that one.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top