 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Guido Schlenke Guest
|
Posted: Sat Jan 03, 2004 12:38 am Post subject: TDBEdit doesn't show me its value |
|
|
I'm working with CB6, IB6 and Windows XP Home and want to work with two
tables of the same database in a TTabSheet of a TPageControl. So I placed
some DBEdit controls, a DBNavigator control and a DBGrid linked to the 1st
table into the TabSheet control. Then I put some DBEdit controls linked to
the 2nd table into that TabSheet control too.
Now I tried to synchronize both of the tables (table1 holds about 20.000 and
table2 about 4.500 records) through the reference in table1 (not indexed) to
the primary index of table2. Therefore I wrote an 'AfterScroll' message
handler for table1 and set a filter on table2 like this:
void __fastcall TForm1::Table1AfterScroll(TDataSet *DataSet)
{
AnsiString str = Table1->Fields->Fields[11]->AsString;
if (str != "")
{
Table2->Filter =
"FldName = '" + str + "'";
Table2->Filtered = true;
}
}
Now I run the program and I scrolled through the records of table1. But the
controls linked to table2 stay empty, whether there is a reference to table2
in the record of table1 or not.
I also did try to define a MasterSource from table2 to table1 with the same
unsuccessful result.
Where is the error???
Thanks in advance
Guido.
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|