 |
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|

December 8th, 2004, 02:37 PM
|
Registered User
|
|
Join Date: Jun 2003
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Access NO PRINT in Report
I would like to prevent user from printing any reports in Access, base on a value 1=ok, 0=Noprint, but would like to let the user see the report in print preview, is there a way to do that??? I cant find any event that triggers when you use the print button in the toolbar or the File-Print in the menu??? thanks.
|

December 8th, 2004, 02:46 PM
|
Friend of Wrox
|
|
Join Date: Oct 2004
Posts: 564
Thanks: 0
Thanked 4 Times in 4 Posts
|
|
What version of Access are you using? I am thinking that you might be able to mess with some of the printer settings so that if they try to print it would send the report off into the great void!
Mike
EchoVue.com
|

December 8th, 2004, 02:48 PM
|
Registered User
|
|
Join Date: Jun 2003
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I am developping in Access 2000, but it will have to work in Access 97 also. I just need nothing to print, can even be a blank page... Maybe If I could do a Docmd.CancelEvent when the File-Print or the tollbar button is click, but how can I do it?? Thanks.
|

December 8th, 2004, 03:05 PM
|
Friend of Wrox
|
|
Join Date: Oct 2004
Posts: 564
Thanks: 0
Thanked 4 Times in 4 Posts
|
|
I have been working with the Printer object in 2003, but that doesn't seem to work in 2000 or before.
Would disbling the print button be an option?
I am currently looking at this link to see if it is possible to disble to the print button when you open the form and enable it when you close the form depending on a variable.
http://support.microsoft.com/?kbid=198464
Mike
EchoVue.com
|

December 8th, 2004, 03:09 PM
|
Registered User
|
|
Join Date: Jun 2003
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Yes, that would be an excellent solution, as long as the user can't print in any way: neitheir by File-Print, or Ctrl-P or Print in the toolbar.. I will also look at your link, but please if you could also check into this matter, Im sure Im not the only one with this problem, and I cant find anything on the web on this... Maybe that is not possible...
|

December 8th, 2004, 03:16 PM
|
Friend of Wrox
|
|
Join Date: Oct 2004
Posts: 564
Thanks: 0
Thanked 4 Times in 4 Posts
|
|
I'll keep looking, so far I haven't found anything that looks workable, but most things are possible, it's just a matter of trying to figure our how to do them! I am also going to check into programatically removing the entire toolbar and menubar as long as the report is open. In the past I have had to do the reverse procedure, and while I am not sure if that will take care of Ctrl-P it will definitely eliminate the other 2!
Mike
EchoVue.com
|

December 8th, 2004, 03:20 PM
|
Registered User
|
|
Join Date: Jun 2003
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Im trying to make the CommandBar option, but it always tell me that the object CommandBar is incorrect, do you know which reference to add in the VBA?
|

December 8th, 2004, 03:23 PM
|
Friend of Wrox
|
|
Join Date: Oct 2004
Posts: 564
Thanks: 0
Thanked 4 Times in 4 Posts
|
|
I ran into the same thing.
If you use the following in the Report_Open event it will hide the main database toolbar, and then use the second line in the close event to make it reappear.
DoCmd.ShowToolbar "Database", acToolbarNo
DoCmd.ShowToolbar "Database", acToolbarYes
I'll keep working on the rest of it.
Mike
EchoVue.com
|

December 8th, 2004, 03:33 PM
|
Registered User
|
|
Join Date: Jun 2003
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Yeah, that works... I have received another answer... So I dont think that it is possible...:
As previously mentioned in these groups. There is no absolute way to do
this. You could make it difficult by removing buttons and changing menus,
but the user can always get the data. They could copy the screen and paste
it into Paint (for example).
This assumes you are concerned with them capturing data they should not give
out or retain.
If you just want to make it hard for the honest folks to accidentally print
it, then there are ways to do so. In addition to changing menus and
buttons, you could force the report to print ot a specified network printer
(while in page setup in design view), then rename or remove that printer.
This would not change from one user to the ne3xt though.
In short, the Windows environment makes it easy to send items to the
printer. This is independent of the application you are using.
|

December 8th, 2004, 03:40 PM
|
Friend of Wrox
|
|
Join Date: Oct 2004
Posts: 564
Thanks: 0
Thanked 4 Times in 4 Posts
|
|
That's true, but often, just making it difficult is enough. An access instructor I had some time ago, said that he found the best security was just hiding as many options as possible and letting the users assume that there is no way to get into the data.
Should I still keep trying to find a way to disable to Quick Keys and Menu Bars? I think I'm close!
Mike
EchoVue.com
|
|
 |