Mikaa
Posts: 9
|
| Posted: 03/07/2006, 6:18 AM |
|
Hey,
If i select a listbox i only get the IDnr. form a table.
Is it possible to retreive the data from this tabel.
For exmaple:
FieldID - FieldDate - FieldData
3 - 03/06/2006 - John Smith
Then i would like to have a sentence like:
"On 03/06/2006 John Smith walked home"
instead of Just the FieldID
"3"
If this is possible could someone please send me a link or an example?
Thanks a lot!
|
 |
 |
Waspman
Posts: 948
|
| Posted: 03/07/2006, 7:22 AM |
|
What do you mean by "Multiple" values?
_________________
http://www.waspmedia.co.uk |
 |
 |
Mika
|
| Posted: 03/07/2006, 7:27 AM |
|
In the property Text Column you can only select 1 Field from a table. I want to select more then 1.
|
|
|
 |
wkempees
|
| Posted: 03/07/2006, 11:39 AM |
|
A listbox consist of an (id,value) pair.
The id will be the bound column, while the value is the textfield.
What you want is very possible within the given id,value pair.
What you need to do is to fill the values with the FieldDate + " - "+
FieldData.
The way to do this is to open the DataSource of your ListBox (Properties) by
pressing [...]
and change the Select part of your SQL statement.
At this moment it will most probably be
SELECT
FieldDate
In the Visual Query Builder (VQB) you can define you own select, so change
it in a concatenation of all fields needed
Good Luck
PS
Concatenation in MSSQL is done by using a "+", in MySQL by using "concat()"
or "concat_ws()"
Yours would be
Select FieldDate + " - " + FieldData as 'FieldDate'
or
Select concat_ws("",FieldDate,"-",FieldData) as "FieldDate"
The as "FieldDate" names the result so that you can pick it from the
Populate list in the Listbox properties.
Walter
|
|
|
 |
Mika
|
| Posted: 03/07/2006, 12:08 PM |
|
Thanks for your help!
|
|
|
 |
|