Print Form In Access 2003

C

Chai

I have a form that is tied to a query. The form is wider than 8 1/2". I
want to print in portrait just the first page for a specific record in the
query.

Right now I have a command button tied to a Printout action macro. In the
macro I've tried setting the Print Range to either Pages or Selection with

"Page From" = 1
"Page To" = 1

It does print the first page, but, it only prints the first record in the
query.

Help. Thanks.

Chai
 
W

Wayne-in-Manchester

To print only the first page use the PrintOut method

DoCmd.PrintOut , 1, 1

Hope this helps
 
J

John Vinson

I have a form that is tied to a query. The form is wider than 8 1/2". I
want to print in portrait just the first page for a specific record in the
query.

Right now I have a command button tied to a Printout action macro. In the
macro I've tried setting the Print Range to either Pages or Selection with

"Page From" = 1
"Page To" = 1

It does print the first page, but, it only prints the first record in the
query.

Help. Thanks.

Chai

Reports are designed for printing - Forms for onscreen display.

Save your Form as a Report; tweak it to include just the data that you
want printed (just the first page); and open the Report from your
button rather than using Printout.

John W. Vinson[MVP]
 
C

Chai

Still prints the first record in a query.

----------------------------------------
Private Sub Command387_Click()
On Error GoTo Err_Command387_Click
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.PrintOut , 1, 1

' DoCmd.PrintOut acSelection ( This is what I had)

Exit_Command387_Click:
Exit Sub

Err_Command387_Click:
MsgBox Err.Description
Resume Exit_Command387_Click

End Sub
---------
 
W

Wayne-in-Manchester

yeah you're right - ooops didn't read the question - don't worry it's then
end of the day and it's snowing (is that a good enough reason) so going home.
 
C

Chai

I did what you suggested. It works out great but it requires a few more
steps than viewing and printing in the form view.

As I have it right now I have two copies of the same form. The first form
is for display only and the other is for printing. This first form has an
unbound list box that is tied to the form . When I click on the the command
button in the first form to print, it prints (2 pages) the other form that is
not opened.

Chai
 
J

John Vinson

I did what you suggested. It works out great but it requires a few more
steps than viewing and printing in the form view.

As I have it right now I have two copies of the same form. The first form
is for display only and the other is for printing. This first form has an
unbound list box that is tied to the form . When I click on the the command
button in the first form to print, it prints (2 pages) the other form that is
not opened.

I did not suggest printing a Form.

I suggested printing a Report (a different kind of object than a
Form).

It requires FEWER steps for the user - just clicking a Print button
(to launch the report).


John W. Vinson[MVP]
 
C

Chai

I copied the form as a report. Included a command button in the form to run
the report. Thanks!
 
Top