Subject strange behaviour-lookupCombo & grid
Author scronkey
Hi there,

This is a bit strange, so I will try to describe it as best I can:
I have a master-detail relationship, and the detail is displayed in
a TIB_Grid.

On this grid, I have a lookupcombo, referencing another table.
There is occasionally a time when the user will select an item from
the combo, but behind the scenes this will be updated to another
record in the combo (the reason is superceded items).

Say the user selects "OLDNUM" from the combo list. This stores a key
value of say 10 into the detail table. On checking, my code will
realise that 10 is superceded by 20 and change the 10 to 20 in the
details field, which is "NEWNUM" in the combo. When I do the
changing in code, the combo reflects this correctly, but only until
I step of that record, at which stage the combo will go back and
display "OLDNUM", even though it has successfully stored 20
("NEWNUM") in the detail table. I have confirmed this by closing and
openiing the form, and "NEWNUM" is correctly displayed, meaning that
20 has been correctly stored.

I do not understand why the lookupcombo displays the incorrect value
once stepping of the detail record

I have tried calling qryDetail.Refresh after updating the field,
which works, but for some reason the grid loses focus, which is
quite a pain for the user as they may have not comp-leted the detail
record entry.

I also do not understand why the grid loses focus when I refresh the
query supplying the grid.

Hope this is understandable, as it's quite important.
It's just more peculiarities I need to understand in IBO, I'm