HA HA...
Here is the whole thing in Basic - Display the results form a QueryDef
in a data window, from a button click on a form:
I'm sure there is another way using a .component:DB/FormGridView - but
that can wait for another day - for now this works.
Thanks Ariel
sub OpenQueryDataView( aQueryName as string, aConnection as variant )
oDesktop = createUnoService("com.sun.star.frame.Desktop")
Dim aURL as New com.sun.star.util.URL
aURL.Complete = ".component:DB/DataSourceBrowser"
oDispatchObject = oDesktop.queryDispatch(_
aURL, _
"_Blank",_
com.sun.star.frame.FrameSearchFlag.CREATE)
Dim aProps(5) as New com.sun.star.beans.PropertyValue
aProps(0).Name = "ActiveConnection"
aProps(0).Value = aConnection
aProps(1).Name = "CommandType"
aProps(1).Value = com.sun.star.sdb.CommandType.QUERY
aProps(2).Name = "Command"
aProps(2).Value = aQueryName
aProps(3).Name = "ShowMenu"
aProps(3).Value = True
aProps(4).Name = "ShowTreeView"
aProps(4).Value = FALSE
aProps(5).Name = "ShowTreeViewButton"
aProps(5).Value = FALSE
oDispatchObject.dispatch(aURL, aProps)
End Sub
As for "Where is this stuff documents?" - well, on the Community forum
in the Code Snippet forum will be one place....
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]