Vrtnar
asked on
select dbedit text depening on edit text
I have linked dbedit to a datasource and a field.
How can I have dbedit showing text from the database depending on edit text?
example:
In the database I have
field1 field2
(field1 has same text as edit)
(field2 is linked to dbedit)
So after my table opens if edit text = field1.text then dbedit.text = field2
However I do not want to replace edit with dbedit
How can I have dbedit showing text from the database depending on edit text?
example:
In the database I have
field1 field2
(field1 has same text as edit)
(field2 is linked to dbedit)
So after my table opens if edit text = field1.text then dbedit.text = field2
However I do not want to replace edit with dbedit
ASKER
But how do I display FIELD2 in my dbedit ??
set the dbEdit's datafield to field2.
ASKER
and if i have a couple of dbedits to change that way,what would be rigt?
You set the DataField property tothe field in the dataset that you want to show in the DBEdit.
ASKER
edits are not the same...
I don't understand what you mean or what you want to do, here.
ASKER
I have 10 edits that contain various text.
I have a table that contains the same texts from each edit and a percentage value for each entry.
Easy way would be to use dbedits to represent the table but instead i must use plain edit.
So next to edits I placed dbeditst to get the percentage.
So how can I filter them according to edittext
I have a table that contains the same texts from each edit and a percentage value for each entry.
Easy way would be to use dbedits to represent the table but instead i must use plain edit.
So next to edits I placed dbeditst to get the percentage.
So how can I filter them according to edittext
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Forced accept.
Computer101
EE Admin
Computer101
EE Admin
Query1.SQL.Text := 'SELECT FIELD2 FROM TABLE WHERE FIELD1 = ' + QuotedStr(Edit1.Text);