[Solved] Runtime error after change to split database

Discuss the database features

[Solved] Runtime error after change to split database

Postby CarltonM » Sun Mar 26, 2017 6:21 pm

Recently converted my database to a spit database as per https://forum.openoffice.org/en/forum/v ... 83&t=65980
However; I now get a run time errors which did not occur before.
The database relies on forms and underlying code for data entry.
The error to show up is on the previously working function below;
Code: Select all   Expand viewCollapse view
sub DebugText(strmessage as string)
'
' Display the supplied text in the Debug message text box.
'
'=====================================================
' Standard block to recover control object by name
'=====================================================
   Dim oDoc As Object       'Current document
   Dim oDocCtrl As Object   'current document control
   Dim oDBtextCtrl As Object' DebugText box control   
   Dim oForms As Object   'Forms object

   oDoc = ThisComponent   'Current document
   oDocCtrl=oDoc.GetCurrentController() 'Current document controller
   oForms = ThisComponent.DrawPage.Forms(0) ' Current Form
   oDBtextCtrl =oForms.getbyName("DebugText")' Recover the DebugText control object
'=====================================================
   
   oDBtextCtrl.text = strmessage   'Set the DebugText control text equal to the message

end sub

This now gives the following run time error;
BASIC runtime error.
Property of method not fount: text.
at the line
Code: Select all   Expand viewCollapse view
oDBtextCtrl.text = strmessage

Why might this have occurred?
Last edited by CarltonM on Fri Mar 31, 2017 12:06 am, edited 1 time in total.
Libre Office 5.1.6.2 on Linux Mint 18.1
Libre Office(x64) 5.3.1.2 and LO Portable V5.2.0.5 on Windows 7
CarltonM
 
Posts: 4
Joined: Sun Mar 26, 2017 5:57 pm

Re: run time error after change to split database

Postby Villeroy » Sun Mar 26, 2017 7:19 pm

Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, OpenOffice 4.x & LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 26399
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: [SOLVED] Runtime error after change to split database

Postby CarltonM » Fri Mar 31, 2017 12:15 am

Thanks for the pointer towards MRI, a useful tool.
It confirmed the code was correct to start with. I thought this was the case as it was used successfully elsewhere n the code.

I ran the code on my W7 machine at work at it works correctly without any modifications. The same code is now running (unchanged) on
Mint 18.1

There was another error of some mis-matched brackets which some versions spotted and some didn't.
Libre Office 5.1.6.2 on Linux Mint 18.1
Libre Office(x64) 5.3.1.2 and LO Portable V5.2.0.5 on Windows 7
CarltonM
 
Posts: 4
Joined: Sun Mar 26, 2017 5:57 pm


Return to Base

Who is online

Users browsing this forum: UnklDonald418 and 2 guests