Secondary index error - Not in edit or insert mode

When trying to set up a secondary index I get the error message
'Datset not in edit or insert mode'

Searching on the first index works great.
The only change in the code is to point the index name to the new
index.  The rest of the commands are the same

The secondary index appeared to be set correctly in Desktop Database.
And the naming is correct.

Any thoughts are appreciated.