Highlight default values on field focus

Someone asked me today if there was a way to highlight a default value that’s in a field (or for that matter, whatever value was entered into a field) upon entering (tabbing or clicking) the field. In this case, the application was a Notes database that has a spreadsheet-like table where lots of numbers can be entered quickly to produce a total at the bottom. So you can see how having the default value highlighted would save a lot of time, since you wouldn’t have to remove the existing text to enter a new value.

The code is below. Stick it in the “Exiting” section of the field’s properties.

��� Dim workspace As New NotesUIWorkspace
�� Set doc = workspace.CurrentDocument���
�� Call doc.SelectAll
]]>

No comments yet. Be the first.

Leave a reply