You've got to remember that a user can hit your chosen key combination (ALT+Z in this case) at any time, in any part of the application. But your textbox is only active when the relevant form is open and active. If you try to give focus to the textbox by means of ON KEY LABEL at any other time, it will cause an error.
For that reason, ON KEY LABEL is a bad choice in this case. In fact, it's a bad choice in almost all cases, and should generally be avoided.
If your aim is give the user a shortcut key to access a given textbox, you can do that more easily with the usual
[tt]\<[/tt] mechanism (as mentioned by Olaf, above). If you are not sure how that works, simply place
[tt]\<[/tt] before the relevant letter in the textbox's caption. (By which I mean the caption of the label that immediately precedes the textbox in tab order.)
For example, if the textbox contains the address of a zoo, you would write the caption of the label as [tt]Address of \<zoo[/tt]. The letter Z will appear underlined. If the user than hits ALT+Z, that will immediately give focus to the textbox.
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
Visual FoxPro articles, tips and downloads