You can either do as Fred suggests, or for a more flexible way of printing
multiple copies of a record do the following.
1. Create a table NumbersToPrint with a single column NumberToPrint of
number data type. Add rows to this table with numbers from 1 to whatever is
the highest number of each record you might want to print at one time.
2. Create a query which includes your current table and the NumbersToPrint
table, but don't join the tables. This creates what's known as the Cartesian
product of the two tables, which simply means that every row in one is joined
to every row in the other.
3. Add the columns from your current table to the query, and also add the
NumberToPrint column. In its 'criteria' row put the following:
<= [Number of copies of record to print?]
If you want it to default to 3 then put something like this:
<= Nz([If not 3 then enter number of copies of record to print:],3)
Pressing Enter at the prompt without specifying any number will then print 3
instances of the record by default.
4. Create a report based on this query (you can use the report wizard to
save time). In this case add one set of controls for each field in the usual
way. If you want a fixed number of records to print on each page, e.g. 3,
then size the detail section so that 3 will print per page.
5. To print just the current record add a button to the form using code as
Fred described. When the report opens you'll be prompted to enter the number
of copies to print, so you can print variable numbers of each record simply
by responding to the prompt.
6. However, the same report can be used to print more than one record, in
which case it will print however many of each you enter at the prompt.
Whether each set of identical records is printed together, or it prints a set
of all records, then another set and so on, depends on how you sort the
report using its internal 'sorting and grouping' mechanism. If you sort on
the primary key of your current table, RecordID in Fred's example, and then
on the NumberToPrint column it will do the former; if you sort first on the
NumberToPrint column and then on the primary key of your current table, it
will do the latter.
Ken Sheridan
Stafford, England
Blondyeee said:
I need to create a command button on a form that will allow me to print the
single record I am viewing 3 times on one page (need to be cut apart for 3
different uses). I am a very inexperienced user. I was able to create a
command button to print a single record, however, I need it to appear on the
page 3 times.
Thanks!