delphidelphi-7nexusdb

DBLookupComboBox and Refreshing of Contents


I have Delphi 7 and I'm using NexusDB for the database.

I have a main form where I have a DBLookupComboBox to list the contents of a Table.

If I press a button I have on the form to add a new item to the list (which opens a 2nd dialog box) and then come back to the main form I want the newly added item to show up immediately

I can't seem to get that to work.

I've tried refreshing the DataSet under the ListSource object.

Anyone have any ideas?

Thanks, David


Solution

  • DBLookupComboBox1.ListSource.DataSet.Close;
    DBLookupComboBox1.ListSource.DataSet.Open;