papafrankc,
.
I didn't test out the bugs, but you done a fine job with squashing them already. Thanks for sharing your changes too. I just hope I can remember them whenever I need to do this again in the future.
.
I'm not as experienced as some of the other folks here. Just trying to give you some ideas to try because I have received a lot of useful help and ideas whenever I get in a pinch. With that being said, anything you get from me needs to be extra tested! LOL
.
As for your 2nd question, the only way I can think of for doing this is to copy back from the (hidden) text field when the user is editing via a ShowRecord condition.
.
procedure Form2_OnShow (Sender: TObject; Action: string);
begin
form2.ComboBox1.Items.Clear ; // ADDED to clear the combo box
Form2.ComboBox1.Items.Add('Spare');
Form2.ComboBox1.Items.Add('Installed');
// For editing
if Action = 'ShowRecord' then
Form2.Combobox1.Text := Form2.Edit1.Text;
end;
.
Again, I haven't tested it for use. But it seems to work on the first attempt. I have also changed this in my example project in case it's necessary for someone else to reference.