Disable Print Button on Toolbar

G

Guest

On the Emplyee_frm, I want to disable the Print button on the Form View
toolbar to prevent someone from printing all of the form's records but only
this particular form. Is this possible without creating a custom toolbar to
replace the Form View toolbar?
 
R

Rick Brandt

Michaniker said:
On the Emplyee_frm, I want to disable the Print button on the Form View
toolbar to prevent someone from printing all of the form's records but only
this particular form. Is this possible without creating a custom toolbar to
replace the Form View toolbar?

Easier solution...

All the objects on a form have a "DisplayWhen" property which can be set to
"Always", "Print Only", or "Screen Only". If you set all objects on your form
to "Screen Only" then even if the user prints it, all the pages will be blank.
 
G

Guest

But if there are 100 records, wouldn't 100 blank pages be fed through the
printers roller?
 
R

Rick Brandt

Michaniker said:
But if there are 100 records, wouldn't 100 blank pages be fed through the
printers roller?

Well, I didn't say it was a perfect solution :)

My assumption was that once the user saw that the form couldn't be printed that
they would no longer try to do so.

You can disable the print button but there is more than one toolbar and menu
that have printing options and the user can also press <ctl-p>. You would have
to block all of those.

In my apps I disable all built in menus and toolbars and supply a custom toolbar
that all reports use and another that all forms use. The one for forms has no
print option, but the user who knows about <ctl-p> can still print them if they
want. Most forms are pretty lousy things to print anyway so it hasn't really
been an issue.
 
G

Guest

I am interested in blocking the Print button on the Form View
toolbar. I realize there are always ways around it but this form, in
particular, needs print prevention. I have greyed out the print function from
the pulldown menu (File>Print) using code but need additional help. You
indicated that it's possible to grey out the print button on the toolbar. I'd
sure appreciate you sharing the steps/code to make that happen!
 
R

Rick Brandt

Michaniker said:
I am interested in blocking the Print button on the Form View
toolbar. I realize there are always ways around it but this form, in
particular, needs print prevention. I have greyed out the print
function from the pulldown menu (File>Print) using code but need
additional help. You indicated that it's possible to grey out the
print button on the toolbar. I'd sure appreciate you sharing the
steps/code to make that happen!

The same sort of code that you used to disable a menu item can be used to
disable a toolbar item. They are both CommandBars just of different types. I
have done this, but don't have the code handy.
 
G

Guest

My approach - simple windows approach

in the form's property, OTHER and in the MODAL change it to YES.
this modal gives the form full importance and people may not be able to
access the toolbars when the form is open

But before you do that make sure that you have
1. the exit option on the form
2. a command button connected to a report's print or preview
3. this report is made to reflect form's current record
IF you dont know to create a report, i found the following website to be
helpful.
http://allenbrowne.com/casu-15.html
hope this helps

Sara
 

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