| re: Print report multiple times based on value in the report
"B Garner" <brian@leach-ltd.getridofthis.co.uk> wrote in message
news:drneih$o3l$1@nwrdmz03.dmz.ncs.ea.ibs-infra.bt.com...[color=blue]
> Hi all
>
> Help please.
>
> I would like to automate the printing of a report.
> The report actually is a single page and prints a label. I would like to
> be able to print the report multiple times based on the value of the items
> field.
> I have a command button which opens the report in the print option. This
> works fine when there is only 1 item.
> Ideally if there were 5 items then the report would print 5 times. I seem
> to be tying myself in knots trying to do this.
>
>
> Many thanks in advance.
>
> B Garner[/color]
There are many solutions to this. One solution involving no vba coding is
to create a table tblNumber:
Qty F1
1 1
2 1
2 2
3 1
3 2
3 3
4 1
4 2
4 3
4 4
etc
Then you can base the report on a query which joins tblYourTable.Qty to
tblNumber.Qty so you get the correct number of records. Although this
approach is simple and reliable you would have to make sure your tblNumber
had sufficient entries - you could do this by entering records for numbers 1
to 50, and putting a validation rule on tblYourTable.Qty to ensure it was
not more than 50. |