Print a form after changing background color and orientation

S

slickdock

I'd like to put a cmdButton on a form that temporarily changes the background
color of the form to white, then changes orientation to landscape and margins
to .5", then prints the form. Can anyone help, using macro commands?
 
J

John W. Vinson

I'd like to put a cmdButton on a form that temporarily changes the background
color of the form to white, then changes orientation to landscape and margins
to .5", then prints the form. Can anyone help, using macro commands?

Forms are for onscreen viewing, Reports are for printing.

Save your form as a Report (File... Save As); reorient it and margin it as you
desire; and print THAT.
 
S

slickdock

Thank you for your reply, but I do understand the difference between forms
and reports. There are reasons I prefer to print the form in this instance.
Is it too late to still get help with my original post?
 
J

John W. Vinson

I'd like to put a cmdButton on a form that temporarily changes the background
color of the form to white, then changes orientation to landscape and margins
to .5", then prints the form. Can anyone help, using macro commands?

I don't think it's possible using macro commands (but I'm no macro expert).

In VBA you would need to open the form in design view, change its properties,
save the form, requery it, print it, open it again in design view, change it
back, save it again... a MAJOR pain, and sure to cause rapid bloat of the
database! Any chance you could save a second copy of the form, with the same
recordsource etc. but the printable format, and open *that* for printing?
 
S

slickdock

The user may have filtered/sorted the form in a number of ways, through combo
box selections as well as a to z's, and find extact matches, etc. I want to
find the easiest way to print the results, so I thought if I could
temporarily remove the background colors (which I have since figured out
through the SetValue command), then send to print landscape (which I still
need help with), the user could get a good printout without me having to code
a report that matches all their sort/filter parameters.
 
J

John W. Vinson

The user may have filtered/sorted the form in a number of ways, through combo
box selections as well as a to z's, and find extact matches, etc. I want to
find the easiest way to print the results, so I thought if I could
temporarily remove the background colors (which I have since figured out
through the SetValue command), then send to print landscape (which I still
need help with), the user could get a good printout without me having to code
a report that matches all their sort/filter parameters.

You can easily get at these sort and filter parameters: Me.Filter and
Me.OrderBy. You could use these in the code which opens up your reformatted
form or report.
 

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