Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi Ian,

I would suggest that you check on the actual name of your form -

Open the Form in Edit mode
Right Click on any field
Choose Form
Make sure the General tab is selected
Whatever is showing in the Name field is the name the system will look for
If it's showing something other than 'Story', then that is your problem
If not, then I don't know.
It's odd that the error message is saying 'StoryTable' rather than 'Story'

You may need to set a breakpoint in Sub OpenStoryTable(oEvent AS Object)
and then single step through the code to see exactly where it throws the
error.  That may give you a clue as to what is happening.

Good luck!
Noel
--
Noel Lodge
lodgemn@gmail.com


On 30 March 2013 02:52, Ian Whitfield <whitfield@telkomsa.net> wrote:

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: users+help@global.libreoffice.org
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

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.