General information
Category:
Forms & Form designer
>I have a form that has a grid, each using a single table.
>
>I want to use key combos to append and delete records to the table in the grid.
>
>I've tried the following sentences in the 'Init' method:
>
>on key label ALT+D delete
>on key Label ALT+N append blank
>
>But when I use it, it doesn't seem to know which table to use.
>After that I used an 'INSERT INTO' sentence with the same results.
>
>
>Any suggestions?
1) The recordsource of the grid will tell you which table is bound.
2) Why not use the keypress event of the column instead of the table? Allowing a person to 'Alt + D' without them being directly on the record in the grid is dangerous. If there are other controls on the screen and you simply allow a 'Alt + D' you are asking for trouble.
Using a keypress event while the grid has focus would at least allow the person to see exactly which record they are deleting.
Robert
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only