OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Listboxes

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base
View previous topic :: View next topic  
Author Message
Ricalmeida
General User
General User


Joined: 04 Oct 2006
Posts: 8

PostPosted: Wed Oct 04, 2006 10:17 am    Post subject: Listboxes Reply with quote

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
View user's profile Send private message
DrewJensen
Super User
Super User


Joined: 06 Jul 2005
Posts: 2616
Location: Cumberland, MD

PostPosted: Thu Oct 05, 2006 10:00 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Ricalmeida
General User
General User


Joined: 04 Oct 2006
Posts: 8

PostPosted: Fri Oct 06, 2006 12:25 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group