I've been using the following macro I've found here in the forums to open a second form via button and it works fine...
Code: Select all
REM Generic macros needed to open any form
function OpenForm( formContainer as variant, oConnection as variant, sFormName as string) as variant
Dim aProp(1) As New com.sun.star.beans.PropertyValue
aProp(0).Name = "ActiveConnection"
aProp(0).Value = oConnection
aProp(1).Name = "OpenMode"
aProp(1).Value = "open"
OpenForm = formContainer.loadComponentFromURL(sFormName,"_parent",0,aProp())
end function
function getFormsTC() as variant
getFormsTC = thisComponent.Parent.getFormDocuments
end function
function getConnectionTC() as variant
getConnectionTC = thisComponent.Drawpage.Forms(0).ActiveConnection
end function
sub OpenForm_Button_Click( oev as variant )
sFormName = oev.Source.Model.Tag
OpenForm( getFormsTC, getConnectionTC, sFormName )
end sub
Thank you in advance for all the help...
N