English
Ask Your Question
0

Open form via macro in Libreoffice Base

asked 2012-11-06 22:17:58 +0200

sdy7 gravatar image

Hi I'm trying to make my database user friendly and I have a question:

From one form, A, I'm launching another form, B, using a button with this macro attached:

Sub openFormByTag(oEv)
    cWhat = com.sun.star.sdb.application.DatabaseObject.FORM
    oModel = oEv.Source.getModel()
    sName = oModel.Tag
    oView = oModel.Parent.Parent.Parent.Parent.getCurrentController()
    oView.loadComponent(cWhat, sName, FALSE)
End Sub

Works fine, but: I would like to specify a row id or something in form A so that form B scrolls automatically to the the particular row I want to view or edit.

Doe anyone have an idea about how this can be done?

Or maybe where there are some comprehensible documentation for this kind of issue perhaps?

Thanks in advance. Soren

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted
0

answered 2012-11-25 06:22:31 +0200

Q gravatar image

Can you explain line by line what is going on?

edit flag offensive delete link more
0

answered 2012-11-26 09:00:13 +0200

sdy7 gravatar image

Well, partly. I am a progammer, but have no experience in Basic and the libre/openoffice API frameworks. I got the code from another post somewhere. The name of the form to open is stored in the tag member of the calling button. That way I can reuse the routine to launch other forms. Why do you ask? Do you know about a solution?

edit flag offensive delete link more
Login/Signup to Answer

Stats

Asked: 2012-11-06 22:17:58 +0200

Seen: 1,389 times

Last updated: Nov 26 '12