Stop People Printing Forms

indesisiv

Access - What's that?
Local time
Today, 20:15
Joined
Jun 13, 2002
Messages
265
Hi all,
I have a form that i use for data input, I have limited all of the menu's how ever the print option is still available. This leads to muppet users printing out the form and using it.
There is a print button on the form that prints a report out that lays out the form into a useable item.

So the question is... How can I stop people being able to print out the form?

Thanks in advance

Steve
 
If I somehow manage to create my own menu bar, how do i turn off the one that is currently there?

Steve
 
DoCmd.ShowToolbar "Database", acToolbarNo
DoCmd.ShowToolbar "Menu Bar", acToolbarNo
DoCmd.ShowToolbar "Web", acToolbarNo
DoCmd.ShowToolbar "Print Preview", acToolbarNo
DoCmd.ShowToolbar "Custom 1", acToolbarYes
 
Thanks for that Rich. Good bye toolbars.
 
I have just tried to utilise this.

I am still able to go to the file menu and select print!!!

That is what i am trying to turn off.

Sorry if i confused the issue.

Steve
 
See if this will work for you

Private Sub Form_Activate()

Dim cbc As CommandBarControl
Set cbc = CommandBars("Menu Bar").FindControl _
(ID:=4, Recursive:=True)
cbc.Enabled = False

End Sub

Private Sub Form_Deactivate()

Dim cbc As CommandBarControl
Set cbc = CommandBars("Menu Bar").FindControl _
(ID:=4, Recursive:=True)
cbc.Enabled = True

End Sub

This will disable the print for this particular form and enable when you deactivate.
I believe if you don't enable, the option will be gone from the entire DB.
 
Last edited:
Toolbar not showing / Hiding

GHudson

I am using your code to turn off all of the toolbars
Code:
This will hide all menu bars and tool bars
Dim i As Integer
For i = 1 To CommandBars.Count
CommandBars(i).Enabled = False
Next i

However I am then previewing a report and trying to get it to show my custom toolbar using.
Code:
DoCmd.ShowToolbar "PatientPassportPreview", acToolbarYes

And i nothing happens.

When I use this database with the "shift key" held down to bypass the start the toolbar shows and hides fine as it doesn't run the hide code or my startup options.

Any thoughts on why it won't show the toolbar??

Thanks
Steve
 
Has anyone else come across this using this code.

Steve
 
Rich said:
Did you try the code version I gave you?


Yes: But as mentioned previously I was still able to select from the menu and print. All the toolbars were gone though.

Steve
 
When using your code Rich I was still able to get all of the toolbars to hide. However I still cannot get my custom toolbar to unhide using the docmd.showtoolbar ...

Again I think that there are some start up issues here as I cannot get the toolbars to appear or dissapear using code except at the very beginning. Yet if I bypass the settings (use a shift start) the code works and the toolbars hide and unhide properly in my reports.

Steve
 
I have created my own toolbar and disabled the default toolbar
To only display your custom toolbar;

Tools , startup then select your custom menu from the menu bar drop down list then deselect the four 'allow' check boxes
 
Thanks

Thanks all.

I now have it sorted.
I think that something must have got a bit corrupted along the line with the database.

I imported all of the forms / tables etc and reset the startup as I had it and Rich's code works a treat.

Thanks for all your help.
Sorry to be a pain.

Steve
 

Users who are viewing this thread

Back
Top Bottom