Textbox Error: Segment: Start (1) + length (2) - 1 exceeds text length (1)

Hello all,

I'm trying to get words to show up in a dictionary when I type in the search box (TextBox). The first letter works fine, but once I try to type another letter, I get this message: Segment: Start (1) + length (2) - 1 exceeds text length (1).

I'm not really sure what to do. The "segment text" block works fine with a simple list - it's only when I try to check in the "key" of the dictionary that I get this error.

Here is my block:

If anyone could help me solve this, I'd be extremely grateful. TIA

Two things:

  • swap the AND tests, to apply the empty test first.
  • for the segment(), use min(length(Textbox1.Text),length(key)) for the length
    bdc9127297a066cdfbb7d86818b4776229085788_2_690x265

You, ABG, are an absolute STAR! Thank you so much.

Here's the full working code for anyone else who might run into this issue:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.