[Gambas-user] Populating a Combobox from a DB
Ron
ron at ...1740...
Fri Aug 1 11:26:50 CEST 2008
> I have a combobox which is populated on the fly from a sqlite DB when
> the form opens.
> Does anyone have any ideas how I can repopulate this box when more items
> are added to the DB from the same form, without closing the form and
> re-opening it? Put briefly I have:-
>
> Public sub form_open()
> Populate the combobox from DB
> End
>
> Public sub Button_click()
> Add items to the DB
> End
>
> It seems to me that I need to somehow refresh the page but I've tried
> ME.refresh and Form.refresh without any luck. Perhaps I'm putting them
> in the wrong place.
>
> Thanks...............
> John
>
> -------------------------------------------------------------------------
>
Something like this perhaps:
Private sub populate_combo()
' routine to load values
end
Public sub form_open()
populate_combo()
End
Public sub Button_click()
Add items to the DB
populate_combo()
End
Regards,
Ron_2nd
More information about the User
mailing list