| View previous topic :: View next topic |
| Author |
Message |
Ricalmeida General User

Joined: 04 Oct 2006 Posts: 8
|
Posted: Wed Oct 04, 2006 10:17 am Post subject: Listboxes |
|
|
Hello,
I would like to have an unbound listbox, showing a certain list of values coming from a SQL query. Until this point I can manage to do. The problem is how can I make it two columns, only one showing and exctract the value on the other colunm in OO Basic?
Thanks for any help. |
|
| Back to top |
|
 |
DrewJensen Super User


Joined: 06 Jul 2005 Posts: 2616 Location: Cumberland, MD
|
Posted: Thu Oct 05, 2006 10:00 pm Post subject: |
|
|
There is no way to do this directly in the ListBox control that I know of.
The only work around that I have found is to create a macro that is called on the Item Status Changed event for the list box. In this macro you would use a prepared statement to query the database for the record you want, using the selected item's text as the criteria.
If you want an example of exactly how to do this let me know.
Drew |
|
| Back to top |
|
 |
Ricalmeida General User

Joined: 04 Oct 2006 Posts: 8
|
Posted: Fri Oct 06, 2006 12:25 am Post subject: |
|
|
Thanks for the answer.
I already thought of that, but as I am only starting to learn OO basic, I was trying to avoid that.
If you have already the code written I would be very grateful if you posted it.
In the meanwhile I will try to write it myself.
EDIT: It's done. |
|
| Back to top |
|
 |
|