I need to execute a formatted search when the field loses focus
Is this even possible? I do NOT want to force the users to press shift-f2 every time to validate/search on every field on the form. This is absurd. How can I trigger a formatted search on a field when it loses focus?
I tried activating menu item #7425, but it's not executing the one on the field that loses focus, but a different one. I guess it only works on the active field??
I tried catching an earlier event, but after it executes the formatted search on the right field, it places the value on whatever field just gained focus instead of the one it was assigned to.
Any ideas here? We cannot force our users to press shift-f2 on all these fields!
The only other idea I have is to not use a formatted search but instead try to create some sort of popup form with a grid and my own query. There has to be an easier way, right?
I use the following on a KeyDown event for when the User tabs out of a field after entering data if the data they entered is not valid. Perhaps you could try this in the LostFocus event:
g_B1Connection.Application.SendKeys("+") Also, I have used this in the KeyDown event: DisplayLookup("txtWO0") Private Sub DisplayLookup(ByVal objText As String) Try WOItem = WOForm.Items.Item(objText) WOItem.Click(SAPbouiCOM.BoCellClickType.ct_Regular) g_B1Connection.Application.SendKeys("+")
Catch ex As Exception
g_B1Connection.Application.MessageBox(ex.Message, "Ok", 1)