Paolo,
I tryed the workaroun from frank

 ocontrol = oDataSourceBrowser.getCurrentControl()
  omodel = ocontrol.getModel.getParent

and that gives what i wanted.

For the completness the code to get acces to data whos is slected bi a user in an open DBS

sub test

    Dim frame1 As Object, frame2 As Object
    Dim url As new com.sun.star.util.URL
    dim oModel As Object
    Dim oResults As Object
    Dim oController As Object, oCtrll As Object
    Dim params(2) as new com.sun.star.beans.PropertyValue
    dim oDocument as object
    dim oDataSourceBrowser  as object
    dim oSelection as object
    dim oRowSet as object

oDocument = thiscomponent
 cntrlr = oDocument.getCurrentController()
    frame1 = StarDesktop.getCurrentFrame()
    frame2 = frame1.findFrame("_beamer",4)
   oDataSourcebrowser = frame2.getController()
   oCtrll = oDataSourceBrowser.getCurrentControl()
   oSelection = oCtrll.GetSelection()

 ocontroller = oDataSourceBrowser.getCurrentControl()
  omodel = ocontroller.getModel.getParent
 oRowSet = oModel.createResultSet()

For ii=LBound(oSelection) To UBound(oSelection)
    Print oSelection(ii)
oRowset.absolute(oSelection(i))
  Next
end sub

At 13:09 1/02/05, you wrote:
Alle 10:37, marted� 1 febbraio 2005, sos ha scritto:
> Frank, Paolo and Marc,
>
> Thanks for the help
> but  .com_sun_star_form_XFormController_getModel  returns "no property or
> method found"
>
> Maybe it has to be written differently ?

No, it should be correct,
But I must admit that I've not tried the code I shown in my example...

>
> And Paolo: where you found this information ?

http://api.openoffice.org/docs/DevelopersGuide/OfficeDev/OfficeDev.htm#1+2+6+Document+Events


ciao PaoloM

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


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



Reply via email to