I want to use F6,F7,etc for an entire form.

Have key preview to true and it works everywhere but on the grid.
On the grid sometimes it works and sometimes not.

Appears that if I am in a cell and press one of them it won't work.

Any ideas?

Shane

Re: catching keystrokes from a Datagrid cell--that should be form wide by SStory

SStory
Tue Dec 02 22:29:22 CST 2003

got the answer in another newsgroup.

You must assign a handler to each control in the grid
dim c as control
for each c in gridwhatever.controls
addhandler c.keydown,mykeydownhandler
next

then make a keydown handler

run this anytime the grid control is rebound.


"SStory" <TheStorys@TAKETHISSPAMBUSTEROUT.Softhome.net> wrote in message
news:ey2GDZHtDHA.2380@TK2MSFTNGP09.phx.gbl...
> I want to use F6,F7,etc for an entire form.
>
> Have key preview to true and it works everywhere but on the grid.
> On the grid sometimes it works and sometimes not.
>
> Appears that if I am in a cell and press one of them it won't work.
>
> Any ideas?
>
> Shane
>
>