I have a form with many controls on it and the main one is a treeview. I have some code that brings up another form for the user to give some information and then run some simple code on the treeview, but the problem is when the code is ending and I ask it to set the focus to the treeview. I get no error, but when I run the routine the treeview somehow losses focus. VBA says it has the focus (checked with with the line debug.print UF1.activecontrol.name) but you cannot see a selected node, and the keyboard input is not going into the control. It seems to go nowhere. Also, strangely the exact same routine from a command button on the form works with no set focus issues. The issue is when running the code from a keydown event with "F2" or keycode 113 being the key to trigger the command. This is not a huge deal as I can easily just click inside the treeview and get the focus back, but I really like the functionality of not having to use the mouse if possible, and this just seems like something is going weirdly wrong here. Thanks for any help!