I have 2 tables that are related to using the master-detail join. I need the join to be inverted when creating Form2, so the main table becomes the details table, and the details table becomes the main table.
I tried to do this, and the program compiles, but does not work the way I want it (the previous connection is interrupted, but it is not reversed, so the kinda program works the same as the tables are not connected at all)
Form1.ADOTableDetail.MasterSource.Destroy;
Form1.ADOTableMaster.MasterSource := Form1.DataSourceDetail;
Form1.ADOTableMaster.MasterFields := 'the_field_that_connects_them';
Any ideas on how I can achieve this?
source
share