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

How to populate a combo box

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


Joined: 06 Jun 2004
Posts: 45
Location: Proudly located in Chile

PostPosted: Mon Jun 28, 2004 11:32 am    Post subject: How to populate a combo box Reply with quote

How to populate a combo box from a Recordset?

From the bottom of America....

KILTRO CHILENSIS
Back to top
View user's profile Send private message
Kiltro_Chilensis
General User
General User


Joined: 06 Jun 2004
Posts: 45
Location: Proudly located in Chile

PostPosted: Mon Jun 28, 2004 12:06 pm    Post subject: *** SOLVED *** Reply with quote

Don't Worry! Solved. please check it for comments....

If Not IsNull(rs) Then
While rs.next
parameter = rs.getString(1)
cboNombres.addItem (parameter, 1)
Wend
End If

Para los Latinos del Foro miren el manual aquí:

StarOffice 7 Office Suite - Manual de programacion en Basic

Yo po'

EL KILTRO CHILENSIS!!!
Back to top
View user's profile Send private message
Zarius
OOo Enthusiast
OOo Enthusiast


Joined: 21 Jan 2005
Posts: 142
Location: Brisbane, Australia

PostPosted: Fri Jan 21, 2005 2:38 am    Post subject: Reply with quote

For large datasets, using the 'with' command seems to be more efficient (it took two seconds off the load time of my dialog with two comboboxes in it).

Code:

If Not IsNull(rs) Then
   With rs
      While .next
         parameter = .getString(1)
         cboNombres.addItem (parameter, 1)
      Wend
   End With
End If


See here for more info.
Back to top
View user's profile Send private message Visit poster's website
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