Thanks Noel

I appreciate the 'come-back'!!!

On 29/03/13 15:13, Marion & Noel Lodge wrote:
Hi Ian,

Is there an error message showing in the Macro Edit window?
I didn't get one before but now when I try again I get
                "BASIC runtime error.
                An exception occurred
                Type:com.sun.container.NoSuchElementException
                Message:StoryTable"

You should be able to close the window after clicking on the Stop Macro button, (a red circle with the white 'X' in it, in the middle of the controls up the top.)
Mine (PClinuxOS 2013.2) is a red circle with a white square and it has no effect!!
The only way to stop it is to close my Main Form and then I can stop it.

Does the sub Form work if you run it manually? (Double click on the Form name.) If so then your button should call the sub that calls the Form - I take it that the Table is connected to the Form.

Yes - it runs fine when I double-Click the Form Icon.

If none of this helps, could you post the modified code you are attempting to run?

My Database is called "FedSaints" and I have 3 Tables - "Members", "eMails" and "StoryTable". In my Forms area I have 2 Forms - My Main Form called "Members" (which includes a SubForm from the "eMail" Table) and a Form called "Story", (This is the Form I'm wanting to pop-up over the main Form with the Button)

This is what I put in the Button Macro...

Sub OpenStoryTable(oEvent AS Object)

      OpenForm("Story")

End Sub

 Sub OpenForm(FormName AS String)

      With ThisDatabaseDocument.currentcontroller

           If Not .isConnected Then

                .Connect

           End if

      End With

      ThisDatabaseDocument.FormDocuments.getByName(FormName).open

End Sub

Thanks for the help

IanW
Pretoria RSA

--
For unsubscribe instructions e-mail to: [email protected]
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Reply via email to