Jacob Floyd wrote:
I was able to do that today. I intend to test with a later release, however, because there have been some changes...Is there, or will there be, a collection of macros to help people in creating forms for Base documents.
Will recording Macros from within Base be enabled?
I need to have a button in a form that opens another form. I did not see any Macros that would do that for me.
I'm not quite sure where to look to write a macro to do this, but I don't know OOo Basic (or any other basic for that matter) I can read and understand what it does, but I have no idea where to begin, and have no time to read lots of manuals on how to script OOo Basic.
Suggestions?
Jacob
I need to think about your specific need.... If this macro runs from within one form, then you can probably get the containing document using something like...
oDoc = ThisComponent.getParent() oForms = oDoc.getFormDocuments() 'Inspect(oForms.getByName(sFName)) oForm = oForms.loadComponentFromURL(sFormName, "_blank", 0, oParms())
Of course, you must set the oParms() appropriately.... AppendProperty(oParms(), "OpenMode", "open") AppendProperty(oParms(), "ActiveConnection", oCon)
In last piece of code, oCon refers to an open connection to the database. I obtain this from the data source that I obtained from the database context. You probably do not want to use the AppendProperty routine, create an array of property values and use the names and values as shown.
This works sporadically in 1.9.87, hopefully this is fixed for 89.
-- 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]
