Getting the Value of an TDBText or TDBEdit. lazarus / 16-Databases ---------------------------------------------------------------------- MaVeRiCk2060 · 2011-04-29 09:54 Hi everybody I need help: I want to set up a dbGrid that connects to one tabkle of a database via ODBC. so far so good. Now I want to have a second grid, to show some special information which is related to one field of the first grid. I can't get the information displayed because I can't get the VALUE of the field needed to set up the SELECT Statement in the second SQLQuery. Please help me. Thanks MaVeRiCk ---------------------------------------------------------------------- SteveF · 2011-04-29 15:10 If they are truly related to each other (there's a foreign key in the second table that links to a column in the first), try setting up a master-detail relationship between the two. If it's properly done, it will work without any additional coding -- everything is handled in the setup between the two grids. Steve ---------------------------------------------------------------------- MaVeRiCk2060 · 2011-05-01 12:34 Thanks for that info SteveF. How can I set up this master-detail relationship between the two SQLQueries? Thx MaVeRiCk ---------------------------------------------------------------------- SteveF · 2011-05-02 18:06 Quote from: MaVeRiCk2060 on May 01, 2011, 02:34:12 pmThanks for that info SteveF. How can I set up this master-detail relationship between the two SQLQueries? Thx MaVeRiCk Good question: that depends on which connection component-set you use.  With the native Lazarus set, I found it rather cryptic.  I found the ZEOSlib set much easier to understand and set up; there's some specific documentation on the ZEOS site that deals with master-detail setup.  In a nutshell: there are properties set for the detail-side query that tell it which query is the master query and which fields in each are the common link. Steve