>Hi all,
>
>I have a grid in a pageframe and when the grid is in focus, if I pressed page-down the grid will scoll down. Instead of this I prefer to page to next page, can this be done?
>
>Thanks.
>
>Farouk Yew Abdullah
Hi Farouk.
Set the KeyPreview property of the form to .T. Then you can put some code in the keypress even of the form to take action when it sees a page down key...something like:
if nkeycode = 3 or nkeycode = 51
If thisform.pageframe1.activepage = thisform.pageframe1.pagecount
thisform.pageframe1.activepage = 1
else
thisform.pageframe1.activepage = thisform.pageframe1.activepage + 1
endif
endif
You can user similar code to trap for page up and take appropriate action.
Marcia