Ian Laurenson wrote:

On Wed, 2005-02-16 at 14:28, Ian Laurenson wrote:


On 2005-02-12, "Frank Sch�nheit - Sun Microsystems, Inc." wrote:


Andrew Pitonyak wrote:


How can I load a Base document,


com.sun.star.sdb.DatabaseContext.loadComponentFromURL( ... )


[remainder snipped]

My apologies for being thick but I can only get the form displayed but
not in a way that it actually functions as a form (code below).


I was being thick - this seems to work:

sub subDisplayForm(sDatabaseName as string, sFormName as string)
dim mArgs(1) as new com.sun.star.beans.PropertyValue

oDatabase = fnGetOpenDatabase(sdatabaseName)
oConnection = oDatabase.getConnection("","")
mArgs(0).name = "OpenMode"
mArgs(0).value = "open" '"openDesign"
mArgs(1).name = "ActiveConnection"
mArgs(1).value = oConnection
oForm = oDatabase.getFormDocuments.getByName(sFormName)
'oForm.visibilityChanged(true)
oForm = oDatabase.getFormDocuments.loadComponentFromURL(sFormName,
"_blank", 0, mArgs())
end sub


Wow, Thanks Ian.... I was just getting ready to post code that did NOT work to try and figure out what I was doing wrong.

--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.sxw
My Macro Book: http://www.hentzenwerke.com/catalog/oome.htm
Free Info:  http://www.pitonyak.org/oo.php


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to