Hallo,
Skyhawk schrieb:
> Moin!
>
> Ich habe folgendes Problem: Ich habe folgende Objektstruktur in meinem
> Formular
>
> Hauptformular
> |
> +--Unterformular "SubFrmA"
> | |
> | +--Tabelle "tblA"
> | |
> | +--Dritte Spalte = Listenfeld "lbA" (Inhalt ein SQL-SELECT)
> |
> +--Unterformular "oSubFrmB"
> |
> +--(...)
>
> Im zweiten Unterformular "oSubFrmB" möchte ich nach einer
> Datenbankaktion das Makro "macroUpdatelbA" ausführen lassen, welches
> einen Reload des Listenfeldes "lbA" ausführt, damit die
> Datensatzänderung in dem Listenfeld "lbA" auch angezeigt wird.
>
>
> ---8<-------------<Code-Schnipsel>-----------------------------------
> Sub macroUpdatelbA
> oDoc = ThisComponent
> oFrm=odoc.drawpage.forms.getbyindex(0)
> oSubFrmA=oFrm.getbyName("SubFrmA")
>
du kannst mal versuchen, an dieser stelle einfach ein reload des
gesamten Formulars SubFrmA zu bewirken.
Das geht mit "oSubFrmA.reload()" .
Oder du versuchst auf das Tabllenobjekt zuzugreifen, das geht mit
oTabModel = oSubFrmA.getByName("tblA")
Das oTabModel ist dabei vom Typ ::
<http://api.openoffice.org/docs/common/ref/module-ix.html> com
<http://api.openoffice.org/docs/common/ref/com/module-ix.html> :: sun
<http://api.openoffice.org/docs/common/ref/com/sun/module-ix.html> ::
star
<http://api.openoffice.org/docs/common/ref/com/sun/star/module-ix.html>
:: form
<http://api.openoffice.org/docs/common/ref/com/sun/star/form/module-ix.html>
:: component
<http://api.openoffice.org/docs/common/ref/com/sun/star/form/component/module-ix.html>
:: GridModel (Details auf api.sourceforge.net ) .
Mit der Spalte wüsste ich jetzt erstmal auch nicht weiter, aber die
Tabelle hat auf jeden Fall eine reset Methode, es ist also
oTabModel.reset()
möglich.
(Ich habs hier jetzt erstmal noch nicht weiter getestet.)
> ???
> lbA = ???
> lbA.Reload
> End Sub
> ---8<----------------------------------------------------------------
>
> Wie realisiere ich nun den Zugriff auf die Tabelle und auf das darin
> enthaltene Listenfeld?
>
> Ich hoffe, es kann mir jemand weiterhelfen!
>
> Mit freundlichen Grüßen, Michael Braun
smime.p7s
Description: S/MIME Cryptographic Signature
