G
Guest
I am trying to block Ctrl+P for a report when it is opened in view mode. Any
idea how to do this, there does not appear to be a keydown or keypress event
on which to determine the keys pressed. Ususally I can do something like
Public Sub mForm_KeyDown(KeyCode As Integer, Shift As Integer)
Dim bShiftDown As Integer, bAltDown As Integer, bCtrlDown As Integer
Dim intCtrl As Integer
bCtrlDown = (Shift And acCtrlMask) > 0 'Test for Ctrl key
If bCtrlDown And KeyCode = vbKeyP Then 'Ctrl+P pressed
KeyCode = 0 'throw out keystrokes
MsgBox ("Ctrl-P not allowed")
End If
.......
end sub
But I can't figure out how to do this with a report.
If this can't be done, is there anyway to block the print dialog via an API
call while the report is open in view mode, then allow it on report_close
event?
Thanks.
idea how to do this, there does not appear to be a keydown or keypress event
on which to determine the keys pressed. Ususally I can do something like
Public Sub mForm_KeyDown(KeyCode As Integer, Shift As Integer)
Dim bShiftDown As Integer, bAltDown As Integer, bCtrlDown As Integer
Dim intCtrl As Integer
bCtrlDown = (Shift And acCtrlMask) > 0 'Test for Ctrl key
If bCtrlDown And KeyCode = vbKeyP Then 'Ctrl+P pressed
KeyCode = 0 'throw out keystrokes
MsgBox ("Ctrl-P not allowed")
End If
.......
end sub
But I can't figure out how to do this with a report.
If this can't be done, is there anyway to block the print dialog via an API
call while the report is open in view mode, then allow it on report_close
event?
Thanks.