Am Dienstag, den 23.12.2008, 15:05 +0100 schrieb Fernand Vanrie:
> Marc,
> 
> Thanks for the quick reply, I saw now that I actualy was using "_blank" 
> in my test envoriment. I have to investigate further this diverences, 
> because using "_default  blocs the frame and  I Have to restart to kill 
> the frame. and OO
> But sorry: " _blank" makes no difference :-)

I'm starting to think using "loadComponentFromURL" is not the right
method of exchanging the Connection.

There is a trick reagarding reusing open frames by handing over the
frame and naming the model in the args() (or the other way round ;), but
I'm unable to find it currently.

Isn't it possible to directly set the "Connection" property of the form
to the new connection and do a reload of the data?

sth. like:
  Formdoc1.Connection = MynewConnection
  Formdoc1.reload() ' or .refresh()

Marc


> Have a merry christmas you to
> 
> fernand
> 
> 
> 
> 
> Marc Santhoff wrote:
> > Am Dienstag, den 23.12.2008, 12:06 +0100 schrieb Fernand Vanrie:
> >   
> >> Hallo All,
> >>
> >> I trye to pass a nwe connection to a already opened form document who 
> >> contains the macro a running from.
> >>
> >> So i have a Base Doc with 2 Form Docs.
> >>
> >> Mi macro resists and is run from  formdoc1 with the macro I trie to pass 
> >> a new connection to  formdoc1
> >>
> >> with the use of the function below i can easly pass a new connection to 
> >> my not opened Formdoc2  But using this function (sort of "reloading"of 
> >> Formdoc1 ) passes but the connection  is not changed.
> >>
> >> 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 = MynewConnection
> >>     aProp(1).Name = "OpenMode"
> >>     aProp(1).Value = "open"
> >>     
> >
> > Try using
> >
> >   
> >>     OpenForm = .loadComponentFromURL(sFormname,"_blank",0,aProp())
> >>     
> >                                                  "_default"
> >
> > here. According to the dev guide "_blank" requests a new blank frame,
> > "_default" reuses the already open one.
> >
> >   
> >> end function
> >>
> >>
> >> so: Can I change the Activeconention in my Formdoc1 ?
> >>
> >> thanks for any hint
> >> Fernand
> >>     
> >
> > HTH, and have a merry christmas without too much work ;),
> > Marc
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
> > For additional commands, e-mail: dev-h...@api.openoffice.org
> >   
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
> For additional commands, e-mail: dev-h...@api.openoffice.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org

Reply via email to