Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / May 2007

Tip: Looking for answers? Try searching our database.

Prevent page down in form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
lreecher - 21 May 2007 17:18 GMT
I have a form with a subform and parent-child relationship on the loan
number. Users will enter data in the subform. All of the fields in the form
are locked as well as the loan number in the subform. I want to prevent users
from being able to page through loan numbers. I know I can prevent scrolling
with the mouse but that doesn't seem to work for paging up or down.
John W. Vinson - 21 May 2007 18:53 GMT
>I have a form with a subform and parent-child relationship on the loan
>number. Users will enter data in the subform. All of the fields in the form
>are locked as well as the loan number in the subform. I want to prevent users
>from being able to page through loan numbers. I know I can prevent scrolling
>with the mouse but that doesn't seem to work for paging up or down.

Probably the safest method - with the side benefit that your form will be much
more efficient - is to base the Form on a Query which returns only the one
loan number that you want the user to see (perhaps referencing a combo box or
other appropriate control in the form's header, or on a switchboard form).

If the other records aren't in the form's recordsource, there's nothing to
page to!

            John W. Vinson [MVP]
Maurice - 21 May 2007 19:03 GMT
Try this:

Form_Keydown(Keycode as Integer, Shift as Integer)
select case KeyCode
   case 33,34, 18  --> place keystrokes...
      keycode=0
   case else
end select
end sub

Quiz: I added three options, pageup, pagedown and tab
Which one is which ;-)

Signature

Maurice Ausum

> >I have a form with a subform and parent-child relationship on the loan
> >number. Users will enter data in the subform. All of the fields in the form
[quoted text clipped - 11 lines]
>
>              John W. Vinson [MVP]
Brendan Reynolds - 21 May 2007 19:55 GMT
Why not use the intrinsic constants, vbKeyPageUp, vbKeyPageDown, and
vbKeyTab?

BTW: according to the object browser, the value of the vbKeyTab constant is
9, not 18. 18 is the value of the vbKeyMenu constant. Just exactly what the
'Menu' key is, I have no idea. Some historical thing retained for backwards
compatibility, perhaps?

Signature

Brendan Reynolds

> Try this:
>
[quoted text clipped - 32 lines]
>>
>>              John W. Vinson [MVP]
lreecher - 23 May 2007 14:12 GMT
I am a little green using VB. The compiler does not like the 'arrow and place
keystrokes'. I am not quite sure what to do about this. Could you please
explain?
Thanks.

> Try this:
>
[quoted text clipped - 24 lines]
> >
> >              John W. Vinson [MVP]
missinglinq - 23 May 2007 17:34 GMT
The  'arrow and place keystrokes was put there for your edification; either
remove them  or REM them out with an apostrophe

case 33,34, 18  ' --> place keystrokes...

Signature

There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

missinglinq - 23 May 2007 17:42 GMT
Brendon is correct,  vbKeyPageUp, vbKeyPageDown will work as well as the
keycodes.

What nobody has mentioned is that the Key Preview property of the form has to
be set to YES.

Properties -- Events -- Key Preview

Signature

There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.