E9.2 Subform Suppress Find issue

BOster

BOster

Legendary Poster
I have a Power Browse with an embedded Reusable Edit Subform. The Subform is linked to a business view with a data bound grid with the QBE line enabled and a standard Find button added to the Subform header. Entering a value(s) in the QBE line and hitting the enter key on the keyboard while focus is on the QBE line or clicking the Find button works as expected in that it executes the query and returns the results to the grid.

Under certain conditions I want to disable the Find action by the user either clicking the Find button or by hitting the enter key while focus is on a QBE column. Under these conditions I disable the Find button which of course prevents the user from clicking the Find button. But this leaves the QBE line where users can still hit the enter key which executes the query (sort of, when the Find button is disabled it actually executes the last query and refills the previous results which is weird but doesn't completely solve my problem due to other issues). To prevent this QBE find action I did the logical thing and on the click event of the Find button I called the system function Suppress Find. Following is ER code:

Code:
If VA frm_cIsDirty is equal to "1"
    Suppress Find
End If

This does in fact stop the query from executing when hitting enter key while focus is on the QBE line. However, the grid is still deleting the previous query results. In other words this has the effect of simply deleting all the records in the grid when what I want is to completely suppress the Find action as in I want to completely prevent the user from executing a Find action and leave the previous query results in the grid... I want it to work just as if the user clicked the disabled Find button as in nothing happens. I have some workarounds so its not a show stopper, but completely suppressing the Find action, specifically deleting previous query results from the grid, would be my preference.
 
Back
Top