Trouble synching a couple of listboxes within a tablecontrol

Win10, LO 7.3.5.2 Hsql 2.5.1

Hi,

Going in circles with a macro which works beautifully in a standard form, but refuses to work
within a tablecontrol making the state listbox dependend on the country listbox selection.

Tried some other macros as well, but seem to miss something and either get the Us picking up Italian states or some incorrect datatype message.

Attached example. Perhaps someone might be able to point out my mistake, thanks

Contacts.odb (23.0 KB)

Hello,
Dependent list boxes in a table control is not as straight forward as individual controls. Modifying a list box column in a table control can affect many records if not properly set.
In this post are two different approaches with samples → How to use user selected value from combobox1 in combobox2 'SELECT' statement

Thank you, I saw the Dog example before but shyed away because of the duplication of text in the treatment table instead of using primary key.

Well that is because of what the OP had in their tables. Just modify to your needs or look at the second example. That stores Integers.

The second example covers separate listboxes not in a tablecontrol. Tried that one some time ago. Will give it another shot.

Going to reverse myself here. At this point after a bit of further thought, do not see being able to use either method in a table control if you want to store the Integer equivalent of the selection.

Thats fine, thank you for your time and effort, Goes into the hold basket for now.