Change form color to white before printing

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have searched help and MS site but just haven't found what I am looking
for. I have a form that has a back color and it gets printed quite often.
How can I keep the color for view but add code before it prints to have the
color go to white?
 
Forms are not supposed to be printed. Reports are to be used for printing.

Ron Gibson
 
I realize that. This form displays the results of a query that shows audits
performed on processed claims. The form displays one record at a time and
sometimes they print the record. Rather than design a report that displays
the the data from the form (they are used to the format) I had hoped to just
add a couple lines to switch the backcolor of the form to white so they don't
burn off toner.

I have a major overhaul of this thing to do and thought this would be the
easiest fix. Is there a way to change the backcolor to white before they
print it?
 
I realize that. This form displays the results of a query that shows audits
performed on processed claims. The form displays one record at a time and
sometimes they print the record. Rather than design a report that displays
the the data from the form (they are used to the format) I had hoped to just
add a couple lines to switch the backcolor of the form to white so they don't
burn off toner.

I have a major overhaul of this thing to do and thought this would be the
easiest fix. Is there a way to change the backcolor to white before they
print it?

The best way is to simply save the form as a report (one time).
Right-click on the form name (on the database folder).
Select "Save as Report".
Change the report back color to white.

Add a command button to the regular form.
Code it's click event:

DoCmd.OpenReport "ReportName", acViewPreview, , "[RecordID]= " &
Me![RecordID]

The above assumes that the query has returned a record which has a
unique prime key number.

The report will print with the white background, just the record shown
on the form at that moment.

If you wish to print the report with out preview, delete acViewPreview
but retain the comma.

Reports have the capability of retaining margin and layout settings,
which form printing does not.
 
JohnK said:
I have searched help and MS site but just haven't found what I am looking
for. I have a form that has a back color and it gets printed quite often.
How can I keep the color for view but add code before it prints to have the
color go to white?

You can set the BackColor property of each section in the
form. Presumably you have a button on the form to initiate
the print operation and the code would go there. I think
you would have to use a timer event to rest the color back.

If you don't have a button on the form and you're letting
the users print via the main menu or toolbar, then I
think(?) you'll have to create custom menu/tool bar items to
invoke your own code.
 
Thanks Fred!! I did not know I could do that with a form. That will work
perfectly. I appreciate the help.

fredg said:
I realize that. This form displays the results of a query that shows audits
performed on processed claims. The form displays one record at a time and
sometimes they print the record. Rather than design a report that displays
the the data from the form (they are used to the format) I had hoped to just
add a couple lines to switch the backcolor of the form to white so they don't
burn off toner.

I have a major overhaul of this thing to do and thought this would be the
easiest fix. Is there a way to change the backcolor to white before they
print it?

The best way is to simply save the form as a report (one time).
Right-click on the form name (on the database folder).
Select "Save as Report".
Change the report back color to white.

Add a command button to the regular form.
Code it's click event:

DoCmd.OpenReport "ReportName", acViewPreview, , "[RecordID]= " &
Me![RecordID]

The above assumes that the query has returned a record which has a
unique prime key number.

The report will print with the white background, just the record shown
on the form at that moment.

If you wish to print the report with out preview, delete acViewPreview
but retain the comma.

Reports have the capability of retaining margin and layout settings,
which form printing does not.
 
Back
Top