

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
1 message in org.openoffice.fr.prog(base) macro pour formulaires?| From | Sent On | Attachments |
|---|---|---|
| Gilles Massardier | Jun 27, 2007 11:44 pm |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | (base) macro pour formulaires? | Actions... |
|---|---|---|
| From: | Gilles Massardier (mas...@free.fr) | |
| Date: | Jun 27, 2007 11:44:24 pm | |
| List: | org.openoffice.fr.prog | |
Je suis en train de créer une base, dans laquelle j'ai plusieurs formulaires. Les tables de ces form sont liées entre elle à partir du nom de famille. dans le premier form, j'ai un bouton qui appelle le second form et ainsi de suite la macro est la suivante :
Function OpenForm( formContainer as variant, oConnection as variant, sFormName as string, optional strMode as string ) as variant Dim aProp(1) As New com.sun.star.beans.PropertyValue dim openMode as string if ismissing( strMode ) then openMode = "open" else openMode = strMode endif aProp(0).Name = "ActiveConnection" aProp(0).Value = oConnection aProp(1).Name = "OpenMode" aProp(1).Value = strMode OpenForm = formContainer.loadComponentFromURL(sFormName,"_blank",0,aProp()) End Function
Sub onClickOuvrirF_Enfant( oEvent as variant ) OpenForm( OEvent.Source.Model.Parent.ActiveConnection.Parent.DatabaseDocument.FormDocuments, OEvent.Source.Model.Parent.ActiveConnection, "F_Enfant") End Sub
Sub onClickF_Parents( oEvent as variant ) OpenForm( OEvent.Source.Model.Parent.ActiveConnection.Parent.DatabaseDocument.FormDocuments, OEvent.Source.Model.Parent.ActiveConnection, "F_Parents") end sub
Sub onClickOuvrirF_Fratrie( oEvent as variant ) OpenForm( OEvent.Source.Model.Parent.ActiveConnection.Parent.DatabaseDocument.FormDocuments, OEvent.Source.Model.Parent.ActiveConnection, "F_Fratrie") end sub
Sub onClickOuvrirF_Note( oEvent as variant ) OpenForm( OEvent.Source.Model.Parent.ActiveConnection.Parent.DatabaseDocument.FormDocuments, OEvent.Source.Model.Parent.ActiveConnection, "F_Note") end sub
Sub onClickOuvrirF_ParrainMarraine( oEvent as variant ) OpenForm( OEvent.Source.Model.Parent.ActiveConnection.Parent.DatabaseDocument.FormDocuments, OEvent.Source.Model.Parent.ActiveConnection, "F_ParrainMarraine") end sub
Sub onClickOuvrirF_Page1( oEvent as variant )OpenForm( OEvent.Source.Model.Parent.ActiveConnection.Parent.DatabaseDocument.FormDocuments, OEvent.Source.Model.Parent.ActiveConnection, "F_Page1")
end sub
Sub onClickOuvrirF_BaptemeAVenir( oEvent as variant )OpenForm( OEvent.Source.Model.Parent.ActiveConnection.Parent.DatabaseDocument.FormDocuments, OEvent.Source.Model.Parent.ActiveConnection, "F_BaptemeAVenir")
end sub
Mon problème est le suivant : comment faire pour appeler le formulaire correspondant au "nom" si je clic depuis enfant sur parents ( une fois le formulaire rempli) je tombe bien sur les parents de l'enfant en question. Par contre, si aucune fiche parents ne correspond à enfant, il faut que cela ouvre un formulaire vierge...
Je n'ai pas trouvé de façon artisanale pour arriver à ce résultat...
Donc si quelqu'un avait une idée, cela me rendrait un grand service...
Merci beaucoup à tous
Gilles Massardier







