Disable Printing?

M

MrsNic

Is there a way to disable the print function in Access. I am building a
simple library database for my school but don't want the pupils to be able to
print. I know they can print screen but that won't be the same s a full list
of books.

I have tried disabling the menu at startup but it seemed to hide everything
but the printer!

All thoughts gratefully acepted:)
 
O

Ofer

1. You can remove the reports from the database, that the student have access
to, 2. Set permissions on the reports
3. Set a default printer on the reports, to a printer that the students have
no access to

There are probably some more options, but you didn't specify what you accept
to happen if teachers open the mdb, do you want then to have the ability to
print?
 
M

MrsNic

Thank you for the suggestion, the librarian may need to print sometimes,
can't the pupils print from the forms even if I disable the reports?

Sorry if I am being dim, but I have been trying to solve this for weeks and
I can't see the wood for the trees now!
 
A

Albert D.Kallal

You will need to hide all of the ms-access interface to keep users out of
design mode etc.

You also should trap the ctrl-p command, as that will also print in addition
to hiding the print menu.

You can hide all of the ms-access stuff by using tools->startup.

For the ctrl-p, you need to make a autokeys macro, and put in the ctrl-p to
trap.

You also will likely need to disable the shift by-pass key on startup, as
that would allow people to get the full menus back when launching the
program.

You most certainly can, and should hide all of the ms-access interface. The
options to complete hide and keep people out of the ms-access interface can
easily be done using the tools->start-up options. Using those options allows
you to complete hide the ms-access interface (tool bars, database window
etc). Also, using these options means you do not have to bother setting up
security.

Try downloading and running the 3rd example at my following web site that
shows a hidden ms-access interface, and NO CODE is required to do
this....but just some settings in the start-up.

Check out:

http://www.members.shaw.ca/AlbertKallal/msaccess/DownLoad.htm

After you try the application, you can exit, and then re-load the
application, but hold down the shift key to by-pass the start-up options. If
want, you can even disable the shift key by pass. I have a sample mdb file
that will let you "set" the shift key bypass on any application you want.
You can get this at:

http://www.members.shaw.ca/AlbertKallal/
 
A

Arvin Meyer [MVP]

The following code examples will show/hide the menu and tool bars:


Function ShowMenu()
On Error Resume Next
DoCmd.ShowToolBar "Menu Bar", acToolbarYes
End Function

Function HideMenu()
On Error Resume Next
DoCmd.ShowToolBar "Menu Bar", acToolbarNo
End Function

Function ShowToolBar()
On Error Resume Next
DoCmd.ShowToolBar "Form View", acToolbarYes
End Function

Function HideToolBar()
On Error Resume Next
DoCmd.ShowToolBar "Form View", acToolbarNo
End Function

You may also need to disable the Ctrl+P function. Set the Form's KeyPreview
property on and use something like this:

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Dim intCtrlDown As Integer
intCtrlDown = (Shift And acCtrlMask) > 0
If intCtrlDown Then KeyCode = 0
End Sub

To lock this up, build an MDE so that students can't get to the code. Use a
macro or code in a transparent button. to turn the Form's KeyPreview
property off if you need some people to print.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
A

Arvin Meyer [MVP]

Create a macro that maps the ctrl + P key to something other than print.
Name the macro AutoKeys

Access will look for the name AutoKeys and know what to do.
 

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