Cursor Behavior and Highlighting Fields

Some programs like to have everything in a field highlighted when the cursor enters that field.  This makes it easy to change the whole field at one time, for example, when the name is spelled wrong and you want to change it.  All you would have to do is simply enter the field, since everything is highlighted, you would just  retype the name and the old is gone, replaced by the new.

Other programs want the cursor to appear at the very beginning of a field, so that the whole field is not accidentally erased should a staff member enter the field and hit a key.

This is a setting that can be set programmatically.  For purposes of this article, we will presume you want to have the cursor start at the beginning of a field.  To make this change for all users of your database, open the mnuIntro form.  Open the coding behind that form.  Find the procedure called “FinishFormX”.  Just after the “On error….” line, add the following:

Application.SetOption “Behavior Entering Field”, 1

Debug and compile to ensure your application does not see any problem with that line.  Close and save the form.  Test the application to ensure it is working properly, then push out to other users.

Related Topics