September 14, 200223 yr If I make a field a button, then it'll do the button command rather than enter the field like normal. Is there any way to make it do *both* enter the field *and* perform the script? If not, can you write a generic (not field-specific) script that will behave precisely equivalent when performed by the field button, as if the field was not a button and you clicked on it? Why do I ask? Because, I want to write such a script but then add a check for the Shift key and if so do one added thing. But otherwise, I want it to behave just like you had clicked on a normal non-button field. More specifically, I want to do: # Enter field like normal (this part I need help on) Go to Field under mouse # If shift, display help on field If (Mod(Status(CurrentModifierKeys), 2)) SetField("G::HelpText", GetField("HELP_" & Status(CurrentFieldName))) Endif If I can figure out how to do either of the above, then I can write just one script and use it with all fields. Otherwise, I must write a "Help" script for each field. Ick. Any other way to get that?
September 14, 200223 yr May be way off base...but what about using a Case statement to determine which "Help" to use??? This would be only one script that could be used on all fields.
September 14, 200223 yr Author Such a 'Case' would change the latter half... but that half already works as I have it... its that first line that I don't know what to do with... and without that you wouldn't have the data to drive the Case anyway (you wouldn't know what field you're clicking on).
September 16, 200223 yr I'm working on a similar problem myself. You can create your script, and simply attach that script to the field on your layout. One of the first steps of the script should be a Go to Field function, which would make it appear as if you simply entered the field the regular way. I don't believe there is a way to generically assign field names in this fashion, but I could be wrong.
September 16, 200223 yr Author Right... I know how to do it if I write a separate script for each field that does an explicit Go to Field "Foo"... but I want to do the same on many fields and would prefer to write just one script. I can easily get the value of the Current Field, without naming it explicitly... but I can't set it (other thread) and I can't Go To it (this thread). I'd rather not have a copy-n-paste script for every darn field in every darn file. Brian
Create an account or sign in to comment