Printing multiple pages

J

jamccarley

I am creating a database that will eliminate a current form. The form is a
three part carbon form where we need to turn in each of the different color
pages to different departments. Is there a way to print a form in access
where it prints 3 pages each time with a different text box on each
indicating the department?
 
K

Ken Sheridan

Create an Access report which replicates your form and base this on a query
which includes the table in which the data for the form is stored and a new
table, DepartmentList say, with columns DepartmentNumber and Department, so
it would look like this:

1 Accounts
2 Sales
3 Purchase and Supply

The query on which the report is based will include both tables, but not
joined. This gives what is known as the Cartesian product of the two tables,
which means each row in one is joined to each row in the other (in
mathematics a Cartesian coordinate is each of a set of coordinates describing
the position of a point in relation to a set of intersecting straight axes),
so you end up with three of each row from the main table (or another query)
in the query's result table. Add whatever columns you need for the report
to the query, plus the DepartmentNumber and Department columns from the
DepartmentList table.

Sort the report firstly on the DepartmentNumber column and then on whatever
is the primary key of the main table. Add a text box to the report, either
in the page header, detail or page footer section bound to the Department
column. Set the detail section's Force New Page property to 'After Section'.

If the report is opened unfiltered you'd get three copies of each record
from the main table on separate pages, with a different department name on
each. But you'll presumably want to filter it to a particular record from
the main table. You can easily do this from a button on a form bound to your
main table (or query) in which the data is entered. The Click event
procedure for the button would have code along these lines, assuming for this
example that the primary key column of the main table is a number column
called MyID:


Dim strCriteria as String

' first ensure current record is saved
Me.Dirty = False

' print report filtered to form's current record
strCriteria = "[MyID] = " & Me.[MyID]
DoCmd.OpenReport "MyReport", WhereCondition:=strCriteria

Ken Sheridan
Stafford, England
 
W

Wayne-I-M

I may be mis-understanding but it seems you are wanting to get rid of a
printed form by printing another form. ??

This is not the best way to do it.

If you are just wanting to print 3 forms - 1st of all don't. Create a
report and print that. Better still get the different dept's to just fill in
the form on screen

You can simply place the form on each front end and then ask the users to
complete it.
 
S

stumac

Hi, you could have a command button with the following code on the form:

Me!mylabel.Caption = "Dept 1"
DoCmd.PrintOut acSelection
Me!mylabel.Caption = "Dept 2"
DoCmd.PrintOut acSelection
Me!mylabel.Caption = "Dept 3"
DoCmd.PrintOut acSelection


Set the label/textbox to only be visible when printing.

Hth

Stu
 
D

DW

Make copies of the report and give it three varying names. Go into design
view and modify the report header of each one. Try building a macro using the
action "Prinout." You can specify how many pages in the settings at the lower
left. You will need a seperate line in the macro grid for each report.

Hope this helps you.
 
T

tedmi

Create Report1 that contains the data to be printed for each department. Then
create Report2 consisting of three pages. Each page has: a text box or label
containing the name of the receiving department, and a subreport containing
Report1. Activate and print Report2. That will produce 3 pages, each with the
same data but with different destination departments.
 
S

Sean Timmons

In your toolbox, insert a Command Button. Select the Print one (Form
Operations - Print a Form)

Right-click on it, go to Properties - On Click, click the ...

textbox1.Visible = True (This has first deparment)
then the print section that's pre-loaded.
Then
textbox1.Visible = False
textbox2.Visible = True
copy and paste print section.
then textbox2.Visible = False
textbox3.Visible = True
copy paste print
textbox3.Visible = False

It sounded good in my head. Make sense?
 

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