[SOLVED]Problem with Traversing active Records in a table with TDBLookupCombobox lazarus / 16-Databases ---------------------------------------------------------------------- BeesKnieg · 2014-10-16 18:50 Hi Guys I want the values in the groupbox (from the attached picture) to change as I select a resident's last name from the DBLookupCombobox. Currently the values in the groupbox only change when I click on another record in the DBGrid or use the DBNavigator on the bottom of the form. DataSource and DataField values for the DBLookupCombobox is empty ListSource for DBLookupCombobox has the same datasource as the DBGrid and DBNavigator ListField and KeyField values for the DBLookupCombobox has the same value (ResidentLName) I feel like I'm missing something small here. Thanks Code: [Select]procedure TfrmEditStudentActivities.FormShow(Sender: TObject); begin   DataModule1.ResidentsSQLQuery1.Close;   DataModule1.ResidentsSQLQuery1.SQL.Text:= 'SELECT * FROM resident2 ' +                                                     'ORDER BY ResidentLName';   DataModule1.ResidentsSQLQuery1.Open; end; ---------------------------------------------------------------------- kpeters58 · 2014-10-16 19:47 You are not giving us enough information - but let's see.... I assume first names & resident IDs are displayed via TDBTexts? You intend to use the TDBLookupcombo for navigational purposes - i.e., by selecting a value you expect the dbgrid to scroll to the matching value and the 2 dbtexts to be updated accordingly? Your UI makes no sense to me - is the grid only there for debugging purposes? ---------------------------------------------------------------------- BeesKnieg · 2014-10-16 19:55 Hi kpeters58 That is correct, yes. first names & resident IDs are displayed via TDBTexts. They change as I use the DBNavigator or click on another record in the DBGrid. And yes, I want to use the DBLookupComboBox for navigational purposes. ie. I want the TDBTexts to update when I select a "lastname" from the DBLookupComboBox which they are not doing at the moment. What other information can I add? ---------------------------------------------------------------------- BeesKnieg · 2014-10-16 20:00 Yes, the DBGrid and DBNavigator is only there for debugging reasons - To show that the DbEdits update when I click on records and use the navigator, but fail to update when I select a "lastname" from the DBLookupComboBox Edit: The picture posted shows the DBEdits displaying data from the active record in the grid. The "lastname" that was selected in the DBLookupComboBox does not match the "lastmane" from the active record from the grid . ---------------------------------------------------------------------- kpeters58 · 2014-10-16 20:04 DBLookupCombo.ScrollListDataset ? Scroll event? See unbound use here: http://wiki.freepascal.org/dblookupcombobox ---------------------------------------------------------------------- BeesKnieg · 2014-10-16 20:17 Ah there we go. Seems like that was the thing I was missing. Taking into account the time I've spent trying to figure this out before I actually asked, I won't forget to set DBLookupCombo.ScrollListDataset to true any time soon . Everything works as it should now. Thanks so much kpeters58.