Prevent Printing

  • Thread starter Thread starter lena
  • Start date Start date
L

lena

Guest
Help me

Hi all,

I using My Acc2002

How by vba I can Turn off print dialog box properties if the user press
( CTRL +P )

thanks alot
 
Last edited:
The best (and possibly only) way to disable the (ctrl+p) autokeys is by a macro, not VBA. You will have to set ctrl+p to a different action which will override it's original Print-related action.

Notice: I am copying this from Microsoft Access Help file. (Just in case someone does not have access to it due to a corrupt file, incomplete installation, etc.) I found it by searching for AutoKeys and it came up as "Assign an action or set of actions to a key"

You can assign an action or set of actions to a specific key or key combination by creating an AutoKeys macro group. When you press the key or key combination, Microsoft Access carries out the action.

1. In the Database window, click Macros -> under Objects.
2. Click New.
3. Click Macro Names on the toolbar.
4. In the Macro Name column, type the key or key combination to which you want to assign the action or set of actions. (For information about the key combinations you can use to make key assignments, see below.)
5. Add the action or set of actions you want the key or key combination to carry out. For example, you could add a RunMacro action that runs the Print Current Record macro when CTRL+P is pressed.
6. Repeat steps 4 and 5 for any other key assignments you want to make.
7. Save the macro group with the name AutoKeys.
The new key assignments are in effect as soon as you save the macro group and each time you open the database.

Note: If you assign a set of actions to a key combination that is already being used by Access (for example, CTRL+C is the key combination for Copy), the actions you assign this key combination replace the Access key assignment.

Information on Key Combinations:
SendKeys syntax ---------- Key combination
^A or ^4 ---------- CTRL+Any letter or number key
{F1} ---------- Any function key
^{F1} ---------- CTRL+Any function key
+{F1} ---------- SHIFT+Any function key
{INSERT} ---------- INS
^{INSERT} ---------- CTRL+INS
+{INSERT} ---------- SHIFT+INS
{DELETE} or {DEL} ---------- DEL
^{DELETE} or ^{DEL} ---------- CTRL+DEL
+{DELETE} or +{DEL} ---------- SHIFT+DEL
 
Thank you very much for your help :) o1110010 :)
 
lena said:
Thank you very much for your help :) o1110010 :)

You're welcome. ;) I try to help out as much as I can to make up for all the questions I have! :p
 

Users who are viewing this thread

Back
Top Bottom