Disable PgUp/PgDn

clippernet
Member Posts: 38
Hello Forum,
is there a way to disable the PgUp/PgDn Keys on a form? Please note that I don't want to change the underlying filter, I just want to prevent users from accidentally changing records...
Thanks in advance,
Beo Lutz
is there a way to disable the PgUp/PgDn Keys on a form? Please note that I don't want to change the underlying filter, I just want to prevent users from accidentally changing records...
Thanks in advance,
Beo Lutz
0
Comments
-
Put a SETRANGE(field,value) in the OnOpenForm-trigger, so people can't browse through the records.No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)0
-
Thanks luc,
however, as I said, I don't really want to change the filter, I just want to disable the keys - is that possible?
The reason is: The scroll wheel of the mouse does PgUp/PgDn keys, and I want to prevent users from accidentally changing records.0 -
I'm not quite sure of what you want to do here. Do you want to stop the user from moving to the previous or the next record?
If so, why not simply set the filter onto a single record and disable inserting of new record?
If you don't want to do it that way, then I don't know of a way to disable keys, but you can stop the user moving to the previous and next records by manually dealing with the OnFindRecord and OnNextRecord triggers. Maybe it's simply the OnNextRecord trigger, I can't quite remember at the moment.
I have a code snippet somewhere that does this.
EDIT: I don't have the code example at hand, so I just did a quick test. If OnNextRecord is blank, a simple EXIT(Steps) will stop the user moving it seems. It does not stop the user clicking on the first and last record buttons however. You would have to deal with that in the OnFindRecord trigger.
EDIT: A simple EXIT(TRUE) in OnFindRecord does the trick, but I did a GET in on open form to set the record.
You will have to have a play with this to get it to do exactly what you want.0 -
another option is to not give users mouse with scroll wheel. Or a keyboard without pageup and pagedown keys.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions