First time here? Check out the FAQ!
Dear all,
I just want to include a button in a Base form that performs a couple of simple tasks. I've been reading about Basic programming in LibreOffice Base, but, in the first place, there is too much information to learn for so little things that I want; in the second place I have found nowhere explaining the actions I want to take.
The use of the button would be extremely simple: it should make visible another control in the form, and then it should go to a random register. That's all.
Anyone could help me with this?
Thanks a lot.
Pep.
Do you mean
sub onBtnClick(oEvent)
Dim form, cntrl
form = oEvent.Source.Model.Parent
cntrl = form.getByName("nameOfControlHideOrVis")
cntrl.setPropertyValue("EnableVisible", True) ' Set visible
' cntrl.setPropertyValue("EnableVisible", not cntrl.EnableVisible) ' Revert
end sub
Is using code like this the only way to construct a useable data base in base?
Yes, it works. Thanks!
LibreOffice is made available by volunteers around the globe, backed by a charitable Foundation. Please support our efforts: Your donation helps us to deliver a better product!
Asked: 2012-09-18 03:27:59 +0200
Seen: 478 times
Last updated: Jun 09
Comment faire un bouton pour lancer l'impression de l'enregistrement en cours ? [closed]
FORM to TABLE connection in Base
macro overlays formula in cell
hyperlink in scalc not working
how to open a Base form from desktop clickable link?
Retrieving primary key id from a Combo Box? [closed]
Create a form similar to Bibliography Database
Can I set tab order between forms and subforms?
How do you use the ROWNUM function (or similar) in LibreOffice Base query?
Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.