Ask Your Question
0

Very simple button tasks (Base form)

asked 2012-09-18 03:27:59 +0200

pepribal gravatar image pepribal
3 1 2

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.

delete close flag offensive retag edit

3 Answers

Sort by » oldest newest most voted
1

answered 2012-09-18 21:01:02 +0200

JohnSUN gravatar image JohnSUN flag of Ukraine
2373 2 23 37
http://wmstrong.ru/

updated 2012-09-18 21:01:44 +0200

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
link delete flag offensive edit
0

answered 2013-06-09 01:22:08 +0200

YassJohn gravatar image YassJohn
1

Is using code like this the only way to construct a useable data base in base?

link delete flag offensive edit
0

answered 2012-09-19 02:14:07 +0200

pepribal gravatar image pepribal
3 1 2

Yes, it works. Thanks!

link delete flag offensive edit

Login/Signup to Answer

Donate

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!

Question tools

Follow

subscribe to rss feed

Stats

Asked: 2012-09-18 03:27:59 +0200

Seen: 478 times

Last updated: Jun 09