I have this code to open a Form from a switchboard, and I would like to press it, execute two actions, the current one and also close the switchboard.
I hope you can help me. Thank you!
------------------------------------------------------------------------------------------------------------------------------------
Code: Select all
REM ***** BASIC *****
Sub OpenForm1 (oEvent as object)
const sNewDocumentName="FRM-Students01" '"FRM-Students"
'If Not Globalscope.BasicLibraries.isLibraryLoaded("MRILib") Then
' Globalscope.BasicLibraries.LoadLibrary( "MRILib" )
'End If
'Dim oMRI as object
'oMRI = CreateUnoService( "mytools.Mri" )
oDoc = ThisDatabaseDocument
'oMRI.inspect oEvent
oForm = oEvent.Source.Model.Parent 'get form from event
'oMRI.inspect oForm
oForm.updateRow 'save selection
oNewFormDocument=oDoc.FormDocuments.getbyname(sNewDocumentName).open
End Sub
Sub Macro1
End Sub