RE:OpenOffice BASE
Publicado por
Viktor (1 intervención) el 14/01/2008 17:31:19
Has de crar una macro con este texto, hemos creado varios formularios como campeonatos, cargos, etc.
Espero que te sirva de algo
Encabezado
REM ***** BASIC *****
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
FIN ENCABEZADO
ABRIR UNO
Sub abrirCAMPEONATOS( oEvent as variant )
OpenForm( OEvent.Source.Model.Parent.ActiveConnection.Parent.DatabaseDocument.FormDocuments, OEvent.Source.Model.Parent.ActiveConnection,"CAMPEONATOS")
end sub
CERRAR UNO
Sub abrirCARGOS_REALIZADOS( oEvent as variant )
OpenForm( OEvent.Source.Model.Parent.ActiveConnection.Parent.DatabaseDocument.FormDocuments, OEvent.Source.Model.Parent.ActiveConnection,"CARGOS REALIZADOS")
end sub
Sub abrirCOLABORADOR( oEvent as variant )
OpenForm( OEvent.Source.Model.Parent.ActiveConnection.Parent.DatabaseDocument.FormDocuments, OEvent.Source.Model.Parent.ActiveConnection,"COLABORADOR")
end sub
Sub abrirCURSOS_CLINICOS( oEvent as variant )
OpenForm( OEvent.Source.Model.Parent.ActiveConnection.Parent.DatabaseDocument.FormDocuments, OEvent.Source.Model.Parent.ActiveConnection,"CURSOS_CLINICOS")
end sub
Sub abrirLICENCIAS( oEvent as variant )
OpenForm( OEvent.Source.Model.Parent.ActiveConnection.Parent.DatabaseDocument.FormDocuments, OEvent.Source.Model.Parent.ActiveConnection,"LICENCIAS")
end sub
Sub abrirTEMPORADA( oEvent as variant )
OpenForm( OEvent.Source.Model.Parent.ActiveConnection.Parent.DatabaseDocument.FormDocuments, OEvent.Source.Model.Parent.ActiveConnection,"TEMPORADA")
end sub
Sub abrirMENU( oEvent as variant )
OpenForm( OEvent.Source.Model.Parent.ActiveConnection.Parent.DatabaseDocument.FormDocuments, OEvent.Source.Model.Parent.ActiveConnection,"Menu")
end sub
CERRAR FORMULARIO
Sub Tancar_formulari
ThisComponent.CurrentController.Frame.close(True)
End Sub
por cierto el openoffice puede ser chulo ( y gratis!) pero el base es una porqueria pinchada en un palo.