Field with button - enter the object in find mode
I have fields throughout my database that have a button associated with them to run a specific script.
Multiple field and multiple layouts use this button, so the solution needs to be dynamic.
When I enter Find mode I cannot type in a search term - the script is run even though I don't want it to.
Using if Get(WindowMode) = 1 at the start of the script, I can determine that I am in Find mode.
I'm stumped on how to tell the script to then put the active cursor into the field to allow me to type a search term.
The field I want to search on is not the active object, the first field on the layout is.
I can keyboard-tab my way through the fields to select the one I want.
How can my script figure out which object I pointed to and make it active ?
Thanks for any solutions you can come up with.