Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disable Ctrl and Fkey functions in report

Status
Not open for further replies.
Jun 2, 2004
66
0
0
US
I have posted something similar to this back in Aug-Sept 2004 for my forms, but now I am trying to apply the same logic to my reports.

I am trying to disable all fkey and ctrl functions when a user opens a report. I do not want them to be able to ctrl+s, or ctrl+f etc...and I do not want them to be able to use F1, F12 etc......

Thanks to RoyVidar I was able to attach the following to the KeyDown property on my forms, however, since there is no keydown property in a report, I'm not sure how to do it in a report.

Any ideas how I could use the below in a report?

(The below disables both Fkey and ctrl functions)

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)

If (Shift And acCtrlMask) > 0 Then
KeyCode = 0
Shift = 0
Else
Select Case KeyCode
Case 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123
KeyCode = 0
End Select
End If
End Sub



 
You might look at using the Autokeys macro that "re-maps" various keys or combinations.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top