I've been delaying asking this print question

Amy35

Registered User.
Local time
Today, 00:51
Joined
Mar 12, 2002
Messages
53
Because it seems so easy/obvious, and I have an idea how to fix it, it's implementing the fix. But here I go anyway.

I have a print button created by a wizard on my form (form is based off a query). When I press the print button, the current record being displayed (along with the theme) prints.

The first problem is that it prints on 2 pages. I've tried making the width of the form smaller (since it's just the blank right part of the screen printing on the 2nd page).
second problem is I'd like the theme not to print.

Here's my code on the print button:

Private Sub cmdPrintRecord_Click()
On Error GoTo Err_cmdPrintRecord_Click


DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.PrintOut acSelection

Exit_cmdPrintRecord_Click:
Exit Sub

Err_cmdPrintRecord_Click:
MsgBox Err.Description
Resume Exit_cmdPrintRecord_Click

End Sub

I vaguely (from 8 years ago) remember in Access 1.1 creating a report based on a query to perform the print function on a form. I used to know Access real well back then but I have blocked this all out of my limited memory and now it's come back to haunt me. How do you solve this seemingly easy problem??

Thanks for any help!

Amy
 
The theme? Do you mean the background/color style of the form?

Create a report that mimics the look of your form. Open that with your button and make sure it specifies the current record (you should be able to look at your current button code to get it to do that.

Forms aren't really designed to be printed, and their formatting often leaves quite a bit to be desired.
 
David:

I think your explanation of WHAT to do is good... but HOW is it done? What I mean is... I can create a report with whatever field control I need, but how do I query on just the current record with code so that when I click the button only the current record prints to the report?

Thanks!

Tom
 

Users who are viewing this thread

Back
Top Bottom