Tuesday, October 20, 2009

Access97 Security in Forms and Reports

One of my clients just showed me a giant loophole in their Access application, which I wrote. (blush!) When he right-clicks on a report in preview mode, he can export the report to a Word document. Why is this scary? Well, the report happens to be an invoice and in Word you can edit the invoice, something you aren't supposed to be able to do!
How do you disable the right-click facility in a report preview? It's connected to the report.ShortcutMenuBar property. Set this property to a menu macro, and it appears instead of the default one.
In forms it's even easier: set the form.ShortcutMenu property to False, and the right-click doesn't work. This is particularly important for login forms where you don't want the user to be able to change to Design View. Of course in a .mde file that doesn't work anyway, but let's rather be safe than sorry.

No comments:

Post a Comment

The last 50 anonymous "comments" have been spam, and were deleted before being published. I have disabled anonymous commenting for a while, until the spammers go away. I appreciate all genuine comments, and publish all comments that are on topic and not spam.