Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change Background Color to White on Print Screen.

Status
Not open for further replies.

uncleG

Technical User
Jun 10, 2004
63
US
On a Continuous Style form I filter and arrange to the desired group of records.
I next use the following Code to perform a Print Screen from my form via a command button.
It works fine but my form has a gray background (Back Color: 12632256).
How would I modify the code below to switch the background color off or to (Back Color: -2147483643) or another white or transparent only on the Print out?
Thanks, UncleG

Private Sub PrintDaForm_Click()
On Error GoTo Err_PrintDaForm_Click

Dim stDocName As String
Dim MyForm As Form

stDocName = "frmItemsR4"

Set MyForm = Screen.ActiveForm
DoCmd.SelectObject acForm, stDocName, True
DoCmd.PrintOut
DoCmd.SelectObject acForm, MyForm.Name, False

Exit_PrintDaForm_Click:
Exit Sub

Err_PrintDaForm_Click:
MsgBox Err.Description
Resume Exit_PrintDaForm_Click

End Sub
 
For printing use a Report, not a form.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top