Instead of including the filter in the label report, leave the report
unfiltered so that by default it would print all labels. You can then
restrict which labels are printed at runtime in various of ways:
1. Change the report's RecordSource to a query with one or more parameters
which prompt you to enter a value or values by which to determine which
labels are printed when the report is opened. This is the simplest approach.
2. Create a dialogue form to open the report and include controls on the
form in which you can enter or select values to determine which labels are
printed. A button on the form to print the labels would then filter the
report to the relevant labels by building a string from the values entered in
the controls on the form.
3. A combination of the above. In this case the parameters in the report's
RecordSource query are references to the controls on the form, and the button
on the form simply opens the report without the need for any code to filter
it. The parameters can be made optional by testing not only for a value in
each but for the parameter being Null, so you can enter values in as few or
as many of the controls on the form in combination as you wish.
If you can post back with more details of the ways in which you wish the
report to be filtered we can be more categorical. It would help if you also
post the report's current RecordSource as the SQL of the query, or if the
RecordSource is a table, the names and data types of the fields in the table.
Ken Sheridan
Stafford, England
Doug wrote:
>I created a label to print some selected records from Access with the Filter
>option.
>Next time, if I want to print different records from the same Access file.
>How can I use the same label created, instead of recreating the same label
>format everytime I want to print other records? >> Stay informed about: Hpw can I use the same label format?