How to pass KeyCode via TextBox.OnKeyUp property in MS-Access VBA
问题 In MS Access, I use VBA to set an event handler function for multiple TextBoxes: txtMyTextBox.OnKeyUp = "=myEventHandlerFunction()" So far, this works fine. However I want to pass the KeyCode of the key that has been pressed. When I create "usual" KeyUp events manually for a TextBox, it automatically provides KeyCode As Integer and Shift As Integer . I was expecting that these could be used with the OnKeyUp property as well, like this: txtMyTextBox.OnKeyUp = "=myEventHandlerFunction(KeyCode)"