Ask Your Question
0

Libreoffice Base - Display Form based on Group Box Option selected

asked 2016-05-22 20:56:39 +0200

hmadhi gravatar image

I have a form that contains Patient Details. I would now like to implement an Group Box so that the user can choose "Cash" or "Medical Aid". The relevant Subform must be displayed depending on what is chosen. Any ideas on how to implement this in Libreoffice Base. I am using LibreOffice version 5.1.3

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2016-05-23 00:02:41 +0200

Ratslinger gravatar image

updated 2020-03-31 00:17:24 +0200

You cannot hide/reveal subforms. You can use macros to open different forms using a group box or buttons. Again using macros, you can make controls visible or not.

Edit 2020-03-30:

Unfortunately, the comment by @chrispdx was not seen until today while looking for something else. The lack of messages being sent is still a major problem with this site.

Here is a copy of the file mentioned in the first comment link -> HideUnhideByGroup.odb

edit flag offensive delete link more

Comments

Thanks for the feedback. Found the a sample application viz formularze_zakladki_v2 .odb at the following link http://ooo-forums.apache.org/en/forum/viewtopic.php?t=33280&p=152727. The only problem is that it is in a foreign language. Looking to do something similar if someone can maybe decipher the code.

hmadhi gravatar imagehmadhi ( 2016-05-24 09:09:58 +0200 )edit

After a quick look, this is exactly what I mentioned - Making controls visible or not. The code is utilizing the group box and cycling through each control in that group to make it visible or not. The only foreign language within are for data names. The actual code is English and needs no translation.

Ratslinger gravatar imageRatslinger ( 2016-05-24 15:30:09 +0200 )edit

There are only a few names to translate (from Polish) - przelacz = Switching, oZdarz = oEvent, oPrzyc = oButton, and ukryj_wszystko = hide_all.

Ratslinger gravatar imageRatslinger ( 2016-05-24 18:22:01 +0200 )edit

Cool thanks @Ratslinger

hmadhi gravatar imagehmadhi ( 2016-05-31 16:14:38 +0200 )edit

The link is broken to the sample application mentioned in the first comment above. Can someone please send a new link or upload that sample? Thank you.

chrispdx gravatar imagechrispdx ( 2020-01-29 23:39:23 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-05-22 20:56:39 +0200

Seen: 587 times

Last updated: Mar 31